LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

margin around objects in the front panel

Hello Everybody,

 

I have I small problem which is disturbing my front panel design:

If I have a front panel with a scroll bar, there is always a margin of around 10 pixels around the objects I place on the FP.

If I have a simple FP with two graphs for example, I can scroll about 10px "further" then the end of the last graph.

 

For simple cases one can surely find a workaround, but my FP contains quite a number of subVIs and pictures and this margin does disturb the "big picture".

 

In my example the red box is the biggest object in the FP. Now, if I run the VI and the scrollbar has adjusted to the size of the content I can still scroll about 10px further than the end of the red box. I would like to get rid of this margin and make the scrollbar stop exactly at the border of the red box.

 

I know this question is not brilliantly formulated, but I hope it is possible to see what I mean.

 

Does anyone have an Idea how to get rid of that margin? I could not find anything ragarding that.

0 Kudos
Message 1 of 5
(2,773 Views)

For simple cases one can surely find a workaround, but my FP contains quite a number of subVIs and pictures and this margin does disturb the "big picture"


Firts of all, the FP can not contain subvi's.

 

You can make use of the "Fit VI window to Largest Dec__ogtk.vi" from Open G to resize the FP based on the larest decoration available. see the attachment (the subvi in green color)

 

1.png

Regards
Guru (CLA)
0 Kudos
Message 2 of 5
(2,767 Views)

And in addition to "Guru" I would like to say, that if you're talking about 10px, does it mean that you can't get your controls closes to one another then 10pix?

This is just a setting in LabVIEW.  Go to "TOOLS" => "OPTIONS" => FRONT PANEL => you should find the parameter there 😉

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 3 of 5
(2,760 Views)

First of all, thank you very much for the answers.

 

Unfortunately, they do not solve my problem. I used the "Fit VI window to Largest Dec__ogtk.vi" but this is not what I need.

If I include "Fit VI window to Largest Dec__ogtk.vi" the FP window resizes to the content but I need a vertical scrollbar since my content is "longer" than my supanel. (It seems like the term subVIs is not correct here - I have several supPanels in my FP in which I open other panels.)

 

Now if I include a scrollbar, the "scrolling" does not stop directly at the end of the last object, but allows you to see about 10px of background above the last object (in my example the red box). if I use "Fit VI window to Largest Dec__ogtk.vi" and keep the vertical scrollbar, I can still scroll further than the and of the red box.

0 Kudos
Message 4 of 5
(2,739 Views)

10 pixels is not a lot.  Does it really matter?  You generally want a bit of a margin between your controls and the edge of a window, so just account for that when you set your window size.  If  you are using a decoration object with a different color background, why not make the background of your front panel to match so that the extra 10 pixels looks like the rest of your VI.

 

It does seem odd that LabVIEW is forcing the 10 pixel margin.  I know normally, it will give some margin so that you can scroll out of your current bounds to be able to place some new objects.  But that only makes sense when you are in edit mode.  In run mode, I don't see why it should be forcing the extra margin.

0 Kudos
Message 5 of 5
(2,731 Views)