YoannG Posted October 12, 2011 Report Share Posted October 12, 2011 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... Quote Link to comment
Tim_S Posted October 12, 2011 Report Share Posted October 12, 2011 In the Window Size category of the VI Properties is a checkbox "Scale all objects on front panel as the window resizes" (at least that's the English text). I think this is what you are looking for. Tim Quote Link to comment
Ton Plomp Posted October 12, 2011 Report Share Posted October 12, 2011 You can resize the window, not the panel. Have a look a the FP.window size property. Ton Quote Link to comment
YoannG Posted October 13, 2011 Author Report Share Posted October 13, 2011 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 Quote Link to comment
LogMAN Posted October 13, 2011 Report Share Posted October 13, 2011 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. 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/ Quote Link to comment
Ton Plomp Posted October 13, 2011 Report Share Posted October 13, 2011 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 Quote Link to comment
asbo Posted October 13, 2011 Report Share Posted October 13, 2011 It's definitly possible to resize the window of a VI: The commas in your block diagram values *really* threw me off until I remembered you're from Europe. Quote Link to comment
naganathas Posted June 27, 2013 Report Share Posted June 27, 2013 https://decibel.ni.com/content/docs/DOC-13727 Quote Link to comment
mikep815 Posted June 28, 2013 Report Share Posted June 28, 2013 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.