Jump to content

Programmatically change size of Panels


YoannG

Recommended Posts

Hello everybody...

I'm trying to tidy correctly my front panel, which is not that simple in labview, as there is not a lot of tool to do so.

I've managed to create a VI to loop over all the controls or decoration of a messy VI and change their positions or sizes (it is not always possible and type dependent).

I'm trying to make this VI change the sizes of an other messy VI panels.

Every strait forward method (using property node) is impossible (properties like size of a panel is read only).

Is there anyway to change the size of a panel inside a front panel programmatically ?

Otherwise is it possible to make a panel get the right size with a build on tool ??

Thanks a lot for any clue (or the answer ! :) )

Yoann

PS apologies for my English, i'm french...

Link to comment

Hello !

Thanks for the replies !

Tim_s, using scale all objects on front panel etc.. does nothing good. Especially on complex front panels!

If one wants to control behaviour of controls while changing size of FP, there is only one way : program it!

Ton, you are perfectly right. Anyway I don't want to change only the size of the FP.

So apparently there's no way to change panel size....

Is there any trick to set their sizes ??

Thanks again.

Yo

Link to comment

Hello !

Thanks for the replies !

Tim_s, using scale all objects on front panel etc.. does nothing good. Especially on complex front panels!

If one wants to control behaviour of controls while changing size of FP, there is only one way : program it!

Ton, you are perfectly right. Anyway I don't want to change only the size of the FP.

So apparently there's no way to change panel size....

Is there any trick to set their sizes ??

Thanks again.

Yo

Hello !

You can change positions of variant elements by using the generic 'position' property (you should have discovered that).

Apperently the 'bounds' property is read only, exept of the FP itself (panel bounds) and some elements (e.g.: XControls).

Is it possible to change 'bouds' property using VI scripting in future versions of LabVIEW???

(I use LV8.6 with VI scripting, but there is nothing there)

I generally use a VI to automatically resize the FP size to the largest decoration (frame) or to full screen.

--> This is good to show multiple windows in same size.

But that is no solution if you also want to change particular element sizes. You will have to do that manually.

I recommand doing it manually, since you need to fit controls to it's contents and your personal visual style. :thumbup1:

LabVIEW does help you with tools to automatically align elements and fit sizes (There are three pull- down menus available):

http://zone.ni.com/reference/en-XX/help/371361E-01/lvhowto/aligning_objects/

Link to comment

It's definitly possible to resize the window of a VI:

<!-- copy and paste. Modify height and width if desired. --> <object id="scPlayer" width="630" height="547" type="application/x-shockwave-flash" data="http://content.screencast.com/users/TonPlomp/folders/Jing/media/fef9ccd7-0107-434c-bc37-e6c4104cbbde/jingswfplayer.swf" > <param name="movie" value="http://content.screencast.com/users/TonPlomp/folders/Jing/media/fef9ccd7-0107-434c-bc37-e6c4104cbbde/jingswfplayer.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <param name="flashVars" value="thumb=http://content.screencast.com/users/TonPlomp/folders/Jing/media/fef9ccd7-0107-434c-bc37-e6c4104cbbde/FirstFrame.jpg&containerwidth=630&containerheight=547&content=http://content.screencast.com/users/TonPlomp/folders/Jing/media/fef9ccd7-0107-434c-bc37-e6c4104cbbde/ResizeFP.swf&blurover=false" /> <param name="allowFullScreen" value="true" /> <param name="scale" value="showall" /> <param name="allowScriptAccess" value="always" /> <param name="base" value="http://content.screencast.com/users/TonPlomp/folders/Jing/media/fef9ccd7-0107-434c-bc37-e6c4104cbbde/" /> Unable to display content. Adobe Flash is required.</object>

Good luck,

Ton

Link to comment
  • 1 year later...

I know it is possible to re-size some front panel Objects...As for ALL i don't know that.  For Example, you can re-size a Tab Control object with 'Tab Control Pane Dimension'...Buttons have 'Button Size'.  Unfortunately they are all object specific properties so if you are trying to do all types you will have to deal with a whole bunch of individual cases.

 

If in Doubt, create a property node and drag it down to show all possible properties and then do a change all to write.  Then look for any property name that looks reasonable with an input instead of an output connector.

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.