LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

menu ring initialization

Hi All,

I have an app (LabVIEW 7) where I use a menu ring to keep the last 5
files used. During runtime it updates and accesses fine. My problem
comes when I start the program.

I save the last 5 files used to the .ini and reload them on startup.
After the program starts my ring is populated and automatically checks
(and displays) the first name in the list. The program has not
processed any file at this point, the default is to wait for the user
to select a new file or a recent one from the ring. However, since
the first item is checked, if the user tries to select it it never
triggers the "Value Changed" event.

So how can I initialize a ring with data but set it to no selection so
that the first time a file is picked it triggers a value
changed
event?

Thanks in advance for any info.

Gc.
0 Kudos
Message 1 of 3
(2,923 Views)
Menu rings are unsigned so you can't set it to -1 as one would do for a listbox e.g.

If you want to do this with a menu ring, you could add an entry as option 0; it could be empty or be named "No file selected"...e.g. That way you'll detect the change. OR you could check the value when the control reports a mouse or key event instead.

I normally use a standard menu for this, have the last opened files available in a section under a File menu, just as typical in other applications (including LV).
0 Kudos
Message 2 of 3
(2,923 Views)
Another way is to do as often is done on web pages; don't react to the ring value being changed, have a button beside it that will load the selected file.
0 Kudos
Message 3 of 3
(2,923 Views)