Jump to content

Tab controls and panes... help!


PA-Paul

Recommended Posts

Hi again,

So, still looking at front panel design. Have been playing around with panes and run into a couple of problems.

First up, the reason I'm looking at using panes is to deal with writing a front panel which will go relatively seamlessly between monitors with different screen resolutions.

So, what I want on my front panel is a couple of controls/indicators which are always visible (status indicators, exit button etc), in the attached, these are arranged in a subset of three panes down the right hand side of the screen. This bit works fine. I can resize in any direction and still maintain the visibility of the controls/indicators. In the main pane, I want to put a tab control which will have different controls/indicators depending on the task the software is currently running (in this case its an acquisition and positioning system, so there'd be a tab for positioning and a tab for acquisition etc). The problem I'm having is getting the controls/indicators within the tab control to behave nicely! I don't want all of the controls to resize within the tab (and I think herein lies my problem). In this application, only want the graphical controls (i.e. waveforms etc) to resize but the other controls to remain fixed in size (as per the first example attached) how do I do this? If I set the tab control to scale with the pane, then I can't individually set the controls within the tab to scale. If I set the graph to rescale (meaning I can't set the tab to scale), the other pages of the tab get messed up.

Any suggestions would be most welcome!

Cheers!

Paul

Front panel 1 - no tab.vi

Front panel 2 - with tab.vi

Link to comment

Hi again,

So, still looking at front panel design. Have been playing around with panes and run into a couple of problems.

First up, the reason I'm looking at using panes is to deal with writing a front panel which will go relatively seamlessly between monitors with different screen resolutions.

So, what I want on my front panel is a couple of controls/indicators which are always visible (status indicators, exit button etc), in the attached, these are arranged in a subset of three panes down the right hand side of the screen. This bit works fine. I can resize in any direction and still maintain the visibility of the controls/indicators. In the main pane, I want to put a tab control which will have different controls/indicators depending on the task the software is currently running (in this case its an acquisition and positioning system, so there'd be a tab for positioning and a tab for acquisition etc). The problem I'm having is getting the controls/indicators within the tab control to behave nicely! I don't want all of the controls to resize within the tab (and I think herein lies my problem). In this application, only want the graphical controls (i.e. waveforms etc) to resize but the other controls to remain fixed in size (as per the first example attached) how do I do this? If I set the tab control to scale with the pane, then I can't individually set the controls within the tab to scale. If I set the graph to rescale (meaning I can't set the tab to scale), the other pages of the tab get messed up.

Any suggestions would be most welcome!

Cheers!

Paul

Front panel 1 - no tab.vi

Front panel 2 - with tab.vi

I don't get what your saying here.

They both seem ok to me :P

If you want only certain things to scale then right click on the control or indicator and choose "scale object with pane".

Link to comment

Hi ShaunR,

Thanks for the reply. The problem is, once you've selected one thing to resize with the pane, you no longer get that option on the other items. I can't find a way of individually selecting which items to scale and which ones not to scale. As far as I can see, I can either choose one item to scale with the pane, no items to scale with the pane or all items to scale with the pane.

If you look at the 2nd example, I've only selected the waveform graph to rescale with pane. If you then look at the second page and reduce the window size, you should see the boolean control on there disappear. So that's somewhat useless.

Anyone know different? I really want to control which items on the pane rescale and which simply move with the rescaled objects.

Cheers!

Paul

Link to comment

As far as I can see, I can either choose one item to scale with the pane, no items to scale with the pane or all items to scale with the pane.

Anyone know different? I really want to control which items on the pane rescale and which simply move with the rescaled objects.

Those are your options. There are no other automatic options that I know of to do what you want.

But you do have a few options:

  1. Try and use a combination of grouping/locking/positioning of controls on the other tabs like you have done for the four buttons on the first tab. If you have more than 1 control you want to resize on the same pane (i.e. another graph on a different tab page), then this won't work.
  2. Manage it all programmatically yourself with property/method nodes.
  3. Look into using a subpanel and different VIs instead of a tab control with different pages.

Good luck! Let us know how it turns out.

Link to comment

Those are your options. There are no other automatic options that I know of to do what you want.

That's a bit of a shame... the only other useful thing I came across by accident was that strict type def'd controls do not resize with the pane... So if I want all my buttons to remain the same size irrespective of pane size, I can strict type them - although that seems a bit clunky... Maybe I should listen to my colleague and go for a more menu driven and less button driven UI - by for this application I think buttons are better...

Ho hum!

Cheers!

Link to comment

What elements are resizing that you don't want to?

If I amke the following arrangement on Page 2 (grouping the label, Boolena 9 and BOolean 10) I see them all sticked to the upper left corner of the tab-page.

I achieve this by grouping them to a item in a sticked postion. You can use a hidden control for this.

post-2399-125629643293_thumb.png

Ton

Link to comment

How do you "stick" an item in position?

Ton is talking about positioning some controls outside the gray resize lines that appear on your FP when you choose Scale Object with Pane. In his picture, he's extended them across the tab using dotted lines. There is a better picture in the LabVIEW help if you search "Scaling Front Panel Objects". You can group controls inside the lines with those outside the lines, and if you get them positioned right, they won't move or will move together the way you want them to.

This is the first alternative option I mentioned to you. I don't really like it except for simple setups. In my experience it can be tricky to get it working the way you want and I'm not convinced it work right across tabs. I'm sure there are rules behind it, but it just doesn't seem to operate consitently for me. YMMV...

That said, why don't you try subpanels if you're comfortable with them. They have there own idosyncrasies, but I believe you'll end up with more control over your UI in the end.

-Scott

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.