From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-18-2014 02:31 AM
Hello,
I have some form that user will fill that has many string and enum controlls, more than 40.
User wil tab and fill one by one. I want to set focus on controll when user clicks on it.
I don't want to make more than 40 event cases and service each control in separate way.
My another idea is to get refs and positions of all controls on FP, then monitor mouse click event on FP, get click position and then search for that controll.
But maybe there is more elegant way that I am not aware of ?
Solved! Go to Solution.
07-18-2014 02:54 AM
Hey Pawhan11,
You could place all references in an Array and register for an mouse down event. In an eventstructure use the Dynamic Event to modifyy the enum you clicked.
Regards,
CMW
07-18-2014 03:05 AM
Even 40 controls is bit high only. Do you have controls of similar data type? If yes why don't you try to create an array out of it and use the event?
07-18-2014 03:22 AM
I thinked about that but it is end user interface and it has to look nice and with array it is not possible.
Yes controlls will have the same type, string or enum.
I think many controlls is acceptable in that case. We only fill these values, print that and forget about them...
07-18-2014 03:27 AM
Thanks CMW..
I tried dynamic event but I registered all events in separate way and it didn't worked like I wanted 😄
You'r code makes it 🙂
Big thanks! , problem solved
07-18-2014 03:31 AM
Looking nice really depends on how you use the Tools palette to make the arrays better.
Sample Array Controls
07-18-2014 03:49 AM - edited 07-18-2014 03:51 AM
I know but this form fields have to be placed in many many diffrent places - like that :
And belive me - this was not my idea 😄
This form has to be saved to pdf and printed. So I wanted to use exaprom pdf addon. But there was problem in creating table with so many fields in different places ( cells had to be added one by one with diffrent colspan and border type... and that would take ages) So I put every page on invisible tab controll and printed that tab as an image to pdf. Text is not as vector but as image. The best part of it is that quality of that was acceptable 😄 😄