LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arrange front panel controls programatically ( as with Align/Distribute/Resize Objects)

Hello, 

is it possible to programatically arrange front panel controls in the same manner as these tool bar actions do?

image.png

0 Kudos
Message 1 of 13
(3,806 Views)

It is.  But it would take a fair amount of programming.  You can search to see if anyone has created any toolkits to do this already, but I don't know if I've ever seen one.

 

What you would do is get references to the controls you want to move, then use property nodes for Position to move to new positions.  The tricky part is the amount of math you'll need to do in order to get their current sizes (width and height), and current position (top and left) and determine the spacing.

 

I'm curious as to where you go the image from that you posted.  The Distribute button seems to incorrectly have the same description as the resize button.  Even the description for the Align button doesn't seem accurate.

0 Kudos
Message 2 of 13
(3,798 Views)

I'm fairly sure that is straight from the getting started guide


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 13
(3,782 Views)

ds.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 4 of 13
(3,765 Views)

@ravyh wrote:

Hello, 

is it possible to programatically arrange front panel controls in the same manner as these tool bar actions do?

image.png


ZE_ Align it may help you, Find & install the attached .zip file here with.

Press Ctrl+Space & Ctrl+a, it'd get align automatically based on your Front panel connector pane terminals (Controls & Indicators).

0 Kudos
Message 5 of 13
(3,751 Views)

@RavensFan wrote:

It is.  But it would take a fair amount of programming.  You can search to see if anyone has created any toolkits to do this already, but I don't know if I've ever seen one.


https://github.com/Carya-Automatisering/Dynamic-Scaling

 

Not so much mend for alignment, but very convenient (in my biased opinion) for front panel scaling in general. Key feature is the dynamic pane creation. E.g. Panes do not need to be predefined...

 

It would depend on the use case if it's a fit.

 

Alignment is something I'm considering to add, as I need this myself.

0 Kudos
Message 6 of 13
(3,744 Views)

Thanks everyone for their reactions.

 

RavensFan wrote: 

I'm curious as to where you go the image from that you posted.  The Distribute button seems to incorrectly have the same description as the resize button.  Even the description for the Align button doesn't seem accurate.


taken from here: http://www.ni.com/white-paper/7566/en/

 

@paul_cardinale
@SABARI_SARAVANAN_M

Thanks for your ideas, though my intention is to arrange controls in run-time which i haven't mentioned - sorry for that.

 wiebe@CARYA wrote:

https://github.com/Carya-Automatisering/Dynamic-Scaling


This looks like a nice project, not exactly what im looking for (probably at this stage of development - i see its a fairly fresh work). Could you provide some kind of description of usage or any other kind of documentation? I think i was unable to grasp the philosophy of the toolkit.

 

I myself have a pack of VIs which handle positioning of FP controls (as a sideproduct of a project) and am thinking of compiling them into a library or a toolkit.

 

Any mentions of other existing projects dealing with the topic are very welcome.

0 Kudos
Message 7 of 13
(3,735 Views)

@ravyh wrote:

wiebe@CARYA wrote:

https://github.com/Carya-Automatisering/Dynamic-Scaling


This looks like a nice project, not exactly what im looking for (probably at this stage of development - i see its a fairly fresh work). Could you provide some kind of description of usage or any other kind of documentation? I think i was unable to grasp the philosophy of the toolkit.


Documentation? Yes, in time.

 

It's a spin off of a project, but for that project it's fully functional.

 

I posted this library after doing a presentation on GDevCon. Those videos will go online soon. Will try to remember posting it here, but on the repo for sure.

 

The philosophy is quite simple:

LabVIEW scaling is a problem. There's one option, fit to pane, and everything else you're on your own. The library allows you to specify the scaling of objects in a pane. It provides a way to show\hide objects and\or panes, and rescaling panes. That's basically it. I'd try a few examples, although they where steps in the presentation, not mend to demonstrate specific features.

 

0 Kudos
Message 8 of 13
(3,730 Views)

VI scripting is pretty powerful. This is a side project I'm working on and the same principles would easily apply to front panel moves. That being said and like @RavensFan 
MarioQuickDrop.gif

Message 9 of 13
(3,711 Views)

Wow əʞɐſ, your VI is very cool!! Is this free application or commercial?

Do operator control the small red-man? Or does he walk by himself?

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 10 of 13
(3,625 Views)