LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

controls appearance in events

hello,

i am working on double-clic events.
i want when i double-clic on a button that some controls appears (from no where) with some dialogue.

Is it possible ?
Samer,
0 Kudos
Message 1 of 20
(4,823 Views)
Yes, it is possible.
 
(they cannot really appear from "nowhere",  but they can be made visible from an invisible state)
0 Kudos
Message 2 of 20
(4,819 Views)
Almost anything is possible - you just need to program it that way.

Buttons are not normally double-clicked. They are single-clicked. That's a basic user interface paradigm. If you really want a double-click action then you need to handle this yourself by playing around with Mouse Down events and timing. I'd wager it's probably not worth the effort. As for the "magically appear out of nowhere", this can be interpreted to mean that you want to make the visible, meaning the controls already exist. If you're referring to "dynamically" creating controls on the fly, well, that's something else.

What do you mean by dialogue? Are you referring to an actual popup dialog box, or some text that appears next to the controls?
Message 3 of 20
(4,814 Views)
Hi Samer & smercurio,

you can detect mouse-doubleclicks using the event structure:
Select event "mouse down" for the button and read the property "Mods" of that event. It's a cluster containing info on "DoubleClick" (and "MenuKey", not needed here). If "DoubleClick" is true you have a doubleclick on your button...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 20
(4,793 Views)
I didn't think to look for that "modification" indication since it just seems to be of little, if any, use for a pushbutton. I played around with that for a little, and from a user interface perspective I can't figure out why you would want that, and why that's there in the first place. The behavior for a regular button looks just weird. If you use the button in the default "Latch" mode then it remains in the depressed state, looking like it's stuck pressed on. If you change it to an indicator then its look doesn't change, so there's no visual indication that you've clicked, or tried to. If you change the mode to one of the "Switch" ones you get varying effects. The "Switch Until Released" seems to make it look like it's behaving like a "regular" single-click button. Which just brings me back to wondering why one would want a double-click action on a button. I suppose it might be useful to have a double-click operation for the LED Boolean but I can't see how it's of any use for the other Boolean controls, like the Toggle Switch. Maybe I'm too parochial.
Message 5 of 20
(4,791 Views)
Hi,

i will rephrase my question:

i am working on events structure.
i want when i clic on a button that some controls appears (from invisible to visible). How can i do that ?
The other question: could i use a dialog box that says, for example "please enter a value" (the event execution should be suspended until the enter of this value). How is it possible ?
Thx,

Samer,
0 Kudos
Message 6 of 20
(4,771 Views)
Hi Samer,

"i want when i clic on a button that some controls appears (from invisible to visible). How can i do that ?"

Have you read our answers, especially Altenbachs? There's a property "visible" for each control, just set it to TRUE or FALSE.
Now you only want to detect a single click? Reading smercurios answer? Why not use a simple boolean switch connected to those property nodes?

"
use a dialog box" - You can make your own dialog boxes by changing the window appearances (switch off scrollbars & menus, make it modal,...)!


Message Edited by GerdW on 06-27-2008 09:04 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 20
(4,767 Views)
In fact i want to do the following:

- when i press on a boolean button the "Create Shared variable" appears with all its input controls and output indicators and i should have a dialog that invites to fill one by one the input controls

- then i should fill the input controls

- then i should press on a button so that "Create Shared variable.vi" be executed

- then a dialog to tell me that the operation has succeeded

- then a dialog box to ask me if i want to create another shared variable or not: If yes i will start over, if no all must disappear

should i use events structure or like u told me "use a simple boolean switch connected to those property nodes" ?





Samer,
0 Kudos
Message 8 of 20
(4,760 Views)
Hi Samer,

you want to create shared variables by your vi? Is there a reason to do so? Btw. in my LV8.5 installation there is no such vi named "Create Shared Variable.vi"...

Do you want to show a new frontpanel or should those controls/indicators "appear" in your main vi? I would prefer to present a new window to the user...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 20
(4,743 Views)
Hi GerdW,

you want to create shared variables by your vi?
Is there a reason to do so?

yes i want to create shared variables. I am working on an OPC server and i want to ceate shared variables in a process (or library)

Btw. in my LV8.5 installation there is no such vi named "Create Shared Variable.vi"...

I have LV8.5 and i have
"Create Shared Variable.vi" in DSC module

Do you want to show a new frontpanel or should those controls/indicators "appear" in your main vi? I would prefer to present a new window to the user...

i was thinking that
controls/indicators should "appear" in my main vi but Could u tell me how to do in both cases ?
Samer,
0 Kudos
Message 10 of 20
(4,734 Views)