From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make an area of the front-panel have scroll bars?

Solved!
Go to solution

I'm writing a VI that provides many options to the user. The front-panel is large and contains many controls ~130 of them, it's divided up visually to match the workings of the system the VI controls. One particular functional block has very many control options though these are rarely used. I can't fit all of the controls I need onto the screen area I have available.

 

What I would like is a way of making an area of the screen with scroll bars on it. I don't need any more than that, just an expansion of the front-panel area I have available. The "Sub-Panel" feature provides the scroll bars. But, a Sub-Panel is a way of accessing another VI, I don't want to do that. I could put the extra controls on the far-left or far-right of everything else and get the user to scroll the main scroll bars at the edges of the screen. The problem with that is that I it would mean couldn't lay out my front panel to match the system block-diagram as I have so far.

 

Does anyone know how to do this?

 

0 Kudos
Message 1 of 21
(4,772 Views)

You can split the front panel into panes, which will give you exactly what you want. To do this, you need to drop a splitter bar (which can be found in the container palette). There are probably also some examples in the example finder (Help>>Find Examples).

 

That said, it's usually not that good to have a large number of controls and a lot of code in a single VI. Using subpanels and splitting the code has advantages in simplifying each part of the code, although it would require making the rest of the code somewhat more complicated, as you would need to manage the different VIs and pass information between them.


___________________
Try to take over the world!
0 Kudos
Message 2 of 21
(4,770 Views)

tst,

 

Thanks for your advice, splitters look very useful. In my case though I want an area with scroll-bars that near the centre of the screen. I could do that with two horizontal splitter and two vertical ones, but it would mess up everything else. I suppose I'll have to use a tab-control.

 

I agree that it's a bad idea to put a lot of code into a single VI. The VI I'm writing has a lot of controls, but not very much code. It takes the information from the controls, adds some extra info to it (using clusters) then passes that to SubVIs which do the actual work. Although the top-level VI is big it isn't complicated, all the complexity is in the SubVIs.

 

 

0 Kudos
Message 3 of 21
(4,765 Views)

I have had the same problem before, when I wanted to have a multiple graphs below each other and didn't wanted to put them into a array since you then wouldn't have smooth scrolling. I solved it as followed:

 

- Create a cluster

- Put all controls that need to be in the scroll area in the cluster

- Add two scrollbars to the cluster

- Add the scrollbar x,y value to the x,y position of the control inside the cluster (with some offset etc...).

 

ps. if I have some time tonight I will create a small example.

 

 

0 Kudos
Message 4 of 21
(4,762 Views)

WouterG,


That would be very useful. I already have all of the controls for this functional block in a cluster.

 

How do you control the x,y value of the control within the cluster?  I've tried doing that with the property "top" but that doesn't seem to work.

 

0 Kudos
Message 5 of 21
(4,755 Views)

It sounds to me like you could use a Tab Control, but apart from that you can change the VI properties of your front panel and show scroll bars.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 21
(4,751 Views)

I recently merged 15 graphs into a single multi-purpose graph.  There were all intensity graphs which may have made life a little simpler..

 

Often, it is not necessary to have multiples of an object.  It increases the size and complexity of the GUI without adding any benefits.

 

How about considering a similar solution instead of scrolling different graphs?

0 Kudos
Message 7 of 21
(4,738 Views)

I know I can show the scroll bars at the edge of the VI. In my case that's not very useful. The front panel shows a block diagram of a system. It's made up of a set of clusters which control various parts of the system. I want to keep this layout because it's very useful in explaining to people new to the system how it works. I inherited that approach from a previous iteration of the program for an older system. The problem I have is that the new system has far more control parameters for one of the blocks. Unfortunately it's one of the blocks in the middle of the block diagram. If it were one at the left, right, top or bottom it would be no problem because the main scrollbars could be used.

 

I can use a tab-control, that's my fall-back plan. The problem is that would be abusing the purpose of the tab control. In a tab control each tab is supposed to deal with a group of controls that have a common connection. So, all the things in tab #1 are supposed to be connected in some way and all the things in tab #2 are supposed to be connected in some way. There not supposed to be a way of gaining more screen space.

 

The controls I'm dealing with are numeric controls, switches and rings.

 

0 Kudos
Message 8 of 21
(4,735 Views)

Yes... inheriting code is often like dealing with a jack in the box..  You don't know what the surprise will look like until it is opened.

 

You might consider some alternatives, such as using picture control which displays the graphs that were taken during the normal course of the program.

It is easy to save the graph image to fiule and you could save them as numerically indexed filenames and retrieve / display them at the touch of a button.

0 Kudos
Message 9 of 21
(4,723 Views)

Ray.R,

 

I haven't got any graphs. I never said I had any graphs.

 

Still I'm sure your advice is useful for those who do.

 

0 Kudos
Message 10 of 21
(4,714 Views)