LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Operate "Recessed Menu Ring" control in CVI 6.0

Hello,
I hope I operate "Recessed Menu Ring" control not only to select an item , but I can also edit its item programmtically .e.g., there is one of an option named "entry a new item" ,when click it , it can be edited so that to input a new value . How to do this?

David
0 Kudos
Message 1 of 4
(3,441 Views)
In the callback for the ring, you could check if the label is "Add an entry". If it is, you could install a popup panel with controls for a label and its value, and OK and Cancel buttons. If OK is clicked, InsertListItem using the new label and value, then RemovePopup(0). If you insert it at the current index, "Add an entry" will get pushed down. If Cancel is clicked, just RemovePopup().
See the attached example in CVI 6.0.
0 Kudos
Message 2 of 4
(3,441 Views)
You could also do something like create a popup menu which you run on EVENT_RIGHT_CLICK. The menu could have items like Delete Item, Insert Item, Edit Item, etc.
Also look at a sample progem that shipped with CVI: ..\CVI\samples\userint\listbox.prj.
0 Kudos
Message 3 of 4
(3,441 Views)
Hi AIS ,

I do not want to use a dialog to change the item , I just want to edit the item in the list area . If click the list area , the cursor can focus on the area and clear the original label .How to ?

David
0 Kudos
Message 4 of 4
(3,441 Views)