01-21-2015 08:20 AM - edited 01-21-2015 08:22 AM
Hello,
I would like to ask how others design their GUI with several command buttons (OK button Boolean).
For instance, there is a simple application where the user can start data acquisition by clicking on a button with text "Start monitoring". Instead of having another button with text "Stop monitoring", usually I just change the button label text into "Stop monitoring", so it is obvious to the user that again clicking on it will stop the monitoring process of the app (in the event case of this button I read out the actual label text with property node in order to decide which action to message to the DAQ loop from the GUI Event handler loop).
If I have another button with label text like "Start file record", I do the same way: after starting file record, I change the text to "Stop file record".
To avoid unnecessary extra programming, this button is only in Enabled state if the application is already in the "monitoring" state. Also, if there is an ongoing file record (+ DAQ obviously), the user cannot operate the "Stop monitoring" button. So depending on the state of the applications, some buttons are Enabled, some in "Disabled and grayed out" state.
I wonder how others are doing their GUI/application?
I am not sure if this is a good way to do, but at least I can avoid extra state check programming and minimizing the number of buttons...
Solved! Go to Solution.
01-21-2015 08:49 AM
I use the Boolean Text options in the properties menu where you can have different text for the TRUE and FALSE states of your buttons. This eliminates some of the code it sounds like you writing.
Play and Pause are the two options that I usually use if buttons.
01-21-2015 08:51 AM
01-21-2015 08:58 AM
01-21-2015 10:19 AM
@Blokk wrote:
Hmm, and i guess i can use " switch when pressed" button behaviour, right?
Exactly
01-21-2015 10:26 AM
Also booleans can have three different images associated with them (well more for things like mouse over but that's not what I mean). You can have an image that is shown when the button it True, when the button is False, or an image that is shown when it is either False or True. So on top of having the text show "Start" or "Stop" I usally replace the True image and the False image with a start and stop icon. Customize the boolean control, and then right click and choose Import Picture From Clipboard and select the appropriate state.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-21-2015 06:45 PM
01-21-2015 10:35 PM
01-21-2015 10:53 PM
@mikeporter wrote:
Personally I like the switch when released behavior because it allows you to compensate for the ohh-no-second. The ohh-no-second is the discrete amount of time it takes to realize you just did a mouse-down on the wrong button.
Because it doesn't switch until the mouse up, you can slide off the button before letting go of the mouse button and no change is made in the booleans state.
Mike..
I like this because it is how a lot of buttons work on Windows. Because of this I tend to just click a lot of buttons and think about what that means when I am holding down the mouse.
I wish I could make use of the ohh-no-second when I fat finger ctrl-w.
01-21-2015 10:55 PM
hm, but yes, the switch when released is just more a behaviour what the a general user expects, so i will use this option! thanks for the suggestion!