LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving Front Panel objects to particular position

Solved!
Go to solution

Hi all,

         I am having a front panel with six boolean controls. In my front panel, I am having two rows each row is having three sets of boolean control.

I need to place all the controls from the origin with the same setup as I mentioned above using the property node.

 

If someone knows the solution Please help me to solve this.....

0 Kudos
Message 1 of 7
(3,511 Views)

Hi Vishnu,

 


@VishnuMVP wrote:

I need to place all the controls from the origin with the same setup as I mentioned above using the property node.

If someone knows the solution …


So you already know you have to use a property node to move the controls: what else do you need to know?

Where are you stuck? Where do you fail? Why don't you attach your current VI showing your approach?

 

Ideas:

- Place all buttons inside a cluster and just move the cluster (less work). You can paint the cluster transparent so it will not be visible to the user…

- When you speak about "rows": are those buttons part of an array? Then you just have to move the array control…

- Why do you need to move controls anyway? Moving them most often creates a bad UX…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,476 Views)

And if you do need to move the UI around (for instance for dynamic panel scaling), consider an existing solution. No need to reinvent the wheel.

0 Kudos
Message 3 of 7
(3,447 Views)

Hint - Wiebe has a nice framework for dynamic panel scaling available here: https://github.com/Carya-Automatisering/Dynamic-Scaling

There's a link in the readme to a video of a presentation he gave about it 😉

 

But as Gerd rightly pointed out, probably there are simpler ways to achieve your goals (the framework is a fully-blown solution to a set of more complicated problems, probably) and Property Node(s) will do what you want (the Position property, probably). You can use a pair of For loops and some simple addition/multiplication to get the positions.

spacing.png


GCentral
Message 4 of 7
(2,935 Views)
Solution
Accepted by topic author VishnuMVP

Hi Gerd

             Thanks for the ideas. I found out the solution to my problem. I have attached the image of my code for your reference.

             I want to move all the front panel objects to the origin.But in the front panel, I am having some controls which are not visible to the user which is for the developer purpose only. But that doesn't know the program, so it is moving all the controls to the origin by taking the starting point as controls, therefore, the alignment is changing. 

           What I did is, I created one decoration control over the controls which at all I am going to show it to the user. I take the decoration as a starting point of the controls and calculate the difference between origin and the controls I have placed, then moved to the origin.

 

 

0 Kudos
Message 5 of 7
(2,268 Views)

Thank you to all for your all valuable suggestions.

0 Kudos
Message 6 of 7
(2,266 Views)

I want to move all the front panel objects to the origin.But in the front panel, I am having some controls which are not visible to the user which is for the developer purpose only.

 

If the user is not supposed to see the control, why not right-click the control and choose "Hide". Seems much simpler and less convoluted.

 

Snap24.png

mcduff

0 Kudos
Message 7 of 7
(2,087 Views)