LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Buttons

Solved!
Go to solution

Hi flezt,

 

I will reply as I can. Keep in mind I do this stuff for a living and am restricted to talking and and reviewing code and consulting is forbidden. "Gotta feed the family". But if you posted screen shots I would not have to download and review code,,, that is different.

 

If you register for mouse down and then compare the click location with the cached away bounds of each of your virtual objects, you can decide which widget was clicked on. In-range in a loop could ID the clicked widget.

 

The order of the widgets in the array process by a loop could help with "over-lapping" objects. But I would urge you avoid over-lapping objects if you can apply that restriction.

 

Spoiler

 

If you want to save yourself time and start where I last left off... PM me.

 

 

 

As I mentioned near the beginning of this thread, this type of project gives one an excellent insight into the work that NI has done to deliver LabVIEW to us.

 

Ben 

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 31 of 33
(517 Views)

Okay, so it would have been fine if I took screenshots. I will definitely keep that in mind next time I decide to post the vi. 

cached away bounds of each of your virtual objects

Hints on where I would find that information would be great. I know where my click location is that shouldn't be a problem. 

 

Unfortunately, I may try to avoid over-lapping at the start but I am sure that, that specific specification will arise in the future. 

 

0 Kudos
Message 32 of 33
(506 Views)

as each object is instanciated in the GUI, its bounds (top bottom left right) are noted and added to a data structure that remembers the bounds and can associate an desired behavior (i.e. mouse don on Boolean acts different than a mouse down on an increment button).

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 33 of 33
(503 Views)