LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create a context menu, which is launched by right mouse button click event?

Email as in header:

wiNOebe.walsSPtra@carAMya.nl

Remove captials...


"Madhan" wrote in message
news:5065000000050000009BC20100-1079395200000@exchange.ni.com...
> Hi wiebe,
> it would be great if u could send it to me !
> madhan@student.ece.utk.edu
> thanks in advance
> madhan
> Note : - sorry could not guess either ur website or eamil address
0 Kudos
Message 11 of 15
(802 Views)
hey guys,
Thinking of Platform independent menus...i played a little bit with Classic ListBox i came up with these VIs. these can be customized very easily. i have just used one list box for Main menu and another listbox for Submenu.
it works very well with Labview 7.1 and 7.0. please see the attachments for example VIs. the code is self explanatory. its far from perfect ...but reflects the basic idea! i feel the idea can be applied to many other controls.
Thanks
madhan
0 Kudos
Message 12 of 15
(802 Views)
Hi,

If you use a listbox, and make the VI a template, the same vi can be used
for each sub menu. You have to make the vi's appear, disappear, position and
resize properly. And of cource the selected item must be highlighted. I also
used some decorations to make a nice frame, so it looks like a real menu.

This seems easy, but it is really not... I did it just to see if it was
possible (it is possible), and as an exercise. The biggest problem is the
events system is limitted. E.g. it's hard to detect in one vi if a mouse was
clicked outside it.

If you only use the same number of sub menu's every time, "static" vi's are
probably the way to go. Perhaps it's fair to say e.g. 10 sub menus are
enough.

Regards,

Wiebe.




"Madhan" wrote in mes
sage
news:506500000005000000BEC40100-1079395200000@exchange.ni.com...
> hey guys,
> Thinking of Platform independent menus...i played a little bit with
> Classic ListBox i came up with these VIs. these can be customized very
> easily. i have just used one list box for Main menu and another
> listbox for Submenu.
> it works very well with Labview 7.1 and 7.0. please see the
> attachments for example VIs. the code is self explanatory. its far
> from perfect ...but reflects the basic idea! i feel the idea can be
> applied to many other controls.
> Thanks
> madhan
0 Kudos
Message 13 of 15
(802 Views)

Wiebe,

Your menus have worked great except for the NrToString.vi.  Could you post the minimumdll.dll that it says it requires?  Thanks.

 

The Q

Quentin "Q" Alldredge

Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner



0 Kudos
Message 14 of 15
(644 Views)

If you're using a recent version of LV (I think 8.2 and above), you should have a built-in ability of creating context menus (I think right clicking a control and looking in the Advanced menu should work).

If you want other solutions, there have been several posted online, both using built-in API functions (for Windows) and using pure LabVIEW code. You should be able to find them if you search here and in the LAVA forums for "pop up" or "context".


___________________
Try to take over the world!
0 Kudos
Message 15 of 15
(621 Views)