Jump to content

Dynamically adjusting position and size of front panel elements


Suvin

Recommended Posts

Hi all,

I have a front panel with maximum 10 indicators. I can select how many indicators to be displayed in the front panel. So no. of front panel elements may vary from 1 to 10. I am having a fixed space in the front panel to accomodate all these indicators. What I need is, if I select for 2 indicators, size and position of these indicators should automatically adjust to accomodate in the given space. That is, if no.of indicators is less, size of indicators should increase accordingly, and if more no.of indicators selected, size of indicators should decrease accordingly. Position of the indicators also need to change inorder to make the front panel neat.

Is it possible? Thanks in advance.

Suvin

Link to comment

Hi all,

I have a front panel with maximum 10 indicators. I can select how many indicators to be displayed in the front panel. So no. of front panel elements may vary from 1 to 10. I am having a fixed space in the front panel to accomodate all these indicators. What I need is, if I select for 2 indicators, size and position of these indicators should automatically adjust to accomodate in the given space. That is, if no.of indicators is less, size of indicators should increase accordingly, and if more no.of indicators selected, size of indicators should decrease accordingly. Position of the indicators also need to change inorder to make the front panel neat.

Is it possible? Thanks in advance.

Suvin

Here's a little toolkit that has the option to 'align and distribute' rectangles, and can be used for your solution.

It does not deal with resizing, but when you figured out the new size, the 'distribute' function will return the new positions of the control on request.

Here's a little demo for this:

post-2399-003339600 1279787515_thumb.png

And a little video:

<object id="scPlayer" class="embeddedObject" width="630" height="547" type="application/x-shockwave-flash" data="http://content.screencast.com/users/TonPlomp/folders/Jing/media/b7173873-b25e-4506-96a3-c27f2c0bae48/jingswfplayer.swf" > <param name="movie" value="http://content.screencast.com/users/TonPlomp/folders/Jing/media/b7173873-b25e-4506-96a3-c27f2c0bae48/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/b7173873-b25e-4506-96a3-c27f2c0bae48/FirstFrame.jpg&containerwidth=630&containerheight=547&content=http://content.screencast.com/users/TonPlomp/folders/Jing/media/b7173873-b25e-4506-96a3-c27f2c0bae48/Distribute.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/b7173873-b25e-4506-96a3-c27f2c0bae48/" /> </object>

Good luck,

Ton

Link to comment

Hi Ton,

Thank you so much for the reply. But I am using LV 8.6 I couldn't open your vi's. Any possibility to get vi s in LV 8.6?

Thanks in advance,

Suvin

Hi Suvin, I've saved the snipped for LV86. Distribute.vi

There is also the Object_distribution package for OpenG attached (also for 8.6) Object_distribution_86-1.2-0.ogp

I suppose you are already using JKI VIPM.

Greetings, LogMAN

Edit: sorry, VI was broken - now it's fine.

Edited by LogMAN
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
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.