06-19-2017 05:31 AM - edited 06-19-2017 05:34 AM
Hi
I've created some cool looking UI in Labview, please download the zip file and run Main.vi
The problem I'm having is when I click on Settings->Calibrate->Settings. The small Accept button next to Calibrate is still visible, and right now I'm not sure how to pass the information that when the Settings button is pressed, then Accept button should hide back.
I guess the same logic should be with other buttons, when you click on Settings->Calibrate->Saving path, the Accept button should also hide back.
I don't know how to make it nice and scalable. I need some help with this, please.
06-19-2017 01:00 PM
Is there a reason you couldn't just hide that button when the settings is pressed again like so?
06-19-2017 01:26 PM
Well, there is one option, but think about pressing other 5 buttons. This Accept should disappear after pressing each one, so you'd have to add it to each 5 cases (among with other things that other buttons show), which is not scalable enough imo...
06-19-2017 01:58 PM
This is true, but I also don't see anything else that hides your settings menu right now except clicking on it again. You asked how you could hide that button again when that menu closes via pressing it, this will do that. What you really want is for the most nested menu to close whenever anything at a higher level gets pressed yeah? Sounds like you'll need to keep track of your nesting level and then for each button press check to see if lower nested levels are open. Is that more like what you want to do?
Or perhaps you just want to close that one specific item whenever another button is pressed. You could do that by registering for all of their "Mouse Down?" events in a single event and closing that specific nesting layer whenever any other button is pressed.
06-23-2017 02:11 AM
Hi
Thanks for your ideas. I did it with OOP. I took advantage of recursive calls and inheritance, and it is my favourite peace of code:)