05-03-2017 08:18 AM - edited 05-03-2017 08:28 AM
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.
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
05-03-2017 09:30 AM
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.
05-03-2017 09:36 AM
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