11-25-2008 08:54 AM
Hi all,
I'm creating a front panel user interface that incorporates a Tab Control (standard LV 8.6 control).
I notice that the Run-Time shortcut menu (the one you get when you right-click with the mouse) only appears if you select one of the tabs or the thin border around the outside, but not anywhere within the tab pane itself? I'm guessing that these shortcut menus are associated with controls only, so when one selects the pane inside the tab control, it doesn't register the mouse click as belonging to the tab control, but the pane within it instead?
I want to customise this menu, and really need it to appear when the user clicks in a blank area of the screen, which will be the pane of my tab control
Any ideas anyone?
Solved! Go to Solution.
11-25-2008 11:36 AM
Hi, Thoric,
Looks simple, but may be tricky... Anyway idea in attachment. Just transparent button with runtime menu, which will be appear when you need it...
See attachment for starting point.
Andrey.
11-26-2008 03:26 AM - edited 11-26-2008 03:27 AM
Hi Audrey,
Thanks for the vi - it's great to see how other coders' workarounds work!
I'd been playing around with a similar idea since posting my question. I'd discovered that pasting a simple picture into the tab pane that filled the region of the tab pane introduced new behaviour similar to what I need. The pasted picture provides a shortcut menu that matches that of the tab control.As long as the picture colour is the same as the tab control it's effectively invisible to the user.
P.S. Just to be clear, I'm not talking about a picture control. Just a pasted picture from the clipboard.
I attach the vi for reference, perhaps people (anyone from NI?) would like to comment on this bizarre LabVIEW behaviour?
11-26-2008 03:29 AM - edited 11-26-2008 03:34 AM
Here's the vi in LV v8.0
Edit: I tried loading this exported-from-8.6-as-8.0 vi in LV8.0 and it failed to work! The run-time menu was corrupt. I recreated it and saved the vi agin, this time in 8.0, as TabControlWithMenu3_8.0vi
11-27-2008 06:53 AM
Afternoon Thoric
I have had a look at your VI and I agree that the behavior is a little strange. I have been looking into how the events are generated and I cannot see a difference between the two tabs, the right click mouse events are generated in both cases so what difference the image makes I do not know.
I am going to file a Corrective Action Request to make sure that R&D are aware of this behavior and I will let you know if I get any useful information back from them.
For now I am glad you have a workaround even if it is a tad confusing as to exactly how it works!
Regards
Rich
NI | UK
01-08-2009 02:51 AM
Just for reference the CAR ID is 139647. I will update this thread if any useful info is found.
Rich
NI | UK