LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tab Control Run-time Shortcut Menu doesn't work?

Solved!
Go to solution

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? Smiley Happy

 

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 1 of 6
(3,797 Views)

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.

Message 2 of 6
(3,778 Views)
Solution
Accepted by topic author Thoric

Hi Audrey,


Thanks for the vi - it's great to see how other coders' workarounds work! Smiley Very Happy

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?

Message Edited by Thoric on 11-26-2008 09:27 AM
Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 3 of 6
(3,762 Views)

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

Message Edited by Thoric on 11-26-2008 09:34 AM
Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 6
(3,760 Views)

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

Message 5 of 6
(3,730 Views)

Just for reference the CAR ID is 139647. I will update this thread if any useful info is found.

 

Rich

NI | UK

Message 6 of 6
(3,573 Views)