LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resize front panel

Solved!
Go to solution

Hello,

 

I have a small question regarding resizing of front panels. So I would like to somehow copy the excel behavior for one of my VIs, so the different sub-panels should resize themselves automaticaly when the VI is resized by the user.

 

My first approach was to use the "Scale object with pane" and "fit control to pane" functions. The problem here is that this function only reacts on the "mouse-up" event, so while the user resizes the window he sees a boring background. And this does not really look professional.

 

Then I tried to use the "Panel Resize" event in my event loop. This looks a bit better, but the rate these events are fired is just not high enough. When I resize the window a bit faster I still have the behavior from above (so I see the background of the VI). Unfortunatly there seems to be no way to increase the update rate for this event.

 

Another idea I had was to catch the mouse movement events. But then I realized I can only catch them when the mouse is over one of my sub-panels, and the border of the VI does not belong to one (sounds logical). Unfortunatly there is no "mouse-move" event for the complete VI.

 

So has anyone else an idea what I still could try. Because I am now out of ideas.

 

Thx and Greetings Dennis

0 Kudos
Message 1 of 3
(1,103 Views)
Solution
Accepted by topic author Tyri

@Tyri wrote:

 

 

My first approach was to use the "Scale object with pane" and "fit control to pane" functions. The problem here is that this function only reacts on the "mouse-up" event, so while the user resizes the window he sees a boring background. And this does not really look professional.


This is one of those lesser known features.  Right click on the splitter between panes, then select the pane you want to be resized as the window is resized (so right, left, top or bottom)  then go to Pane Sizing >> and Resize objects while resizing.  Now the pane will resize as the window is resized and not just on mouse up.

 

This feature was originally added many years ago when resizing dialogs could be a system intensive process, if there were lots of things being resized with every pixel move of the mouse.  Since then PCs are better and in my opinion it should be on by default.

0 Kudos
Message 2 of 3
(1,089 Views)

Thanks, this worked out quite well.

 

For some reason I did not find this (well hidden) function:)

 

Greetings Dennis

0 Kudos
Message 3 of 3
(1,081 Views)