LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graphical shortcut menu

I understand that LabView now supports shortcut menus -- when right clicking on an object, you can now customize the options allowed, instead of just the usual "Reinitialize to Default" and so on.  That's pretty cool.

Has anyone done a graphical shortcut menu, in a similar vein as LabView's Tools Palette, where you can choose numerics, booleans, strings, etc?  (Or are graphical shortcut menus actually supported in LabView and I'm just not seeing it?)

I've nearly designed it myself, which leads me to the next question....  I've created the shortcut menus as VI's, and I'd like to pop them up at the mouse position.  I'm stuck.  How can I get the mouse coordinates in Global Screen Coordinates?  I know how to get the upper-left position of the front panel by using "FP.PanelBounds".  But I can't figure out how to get the mouse position relative to that point.  The "Coords" value in the Mouse Move event seems to give me the position relative to some origin that LabView decided to place.

Hmmm...  I suppose a klugy way would be to ensure that the LabView origin coincides with the top-left portion of the panel.  Hmmm...  That might work, but I'd appreciate any help.

Thanks,
Tom
0 Kudos
Message 1 of 3
(2,859 Views)
Hi,

I've done this once to create my own graph legent. An exact copy of
LabVIEW's graph legend, without all the bar chart options.

I did it exactly like you are doing it.

You are right, the mouse coordinates are relative to the origin, but you can
read back the origin. Use Front Panel>Origin in <LV7.1, or (without looking)
Pane>Origin in >LV8.0.

Regards,

Wiebe.


Message 2 of 3
(2,839 Views)
Perfect!  Thanks!  Got it working in LV 8.2.1.

-Tom
0 Kudos
Message 3 of 3
(2,821 Views)