12-19-2019 02:43 AM
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.....
Solved! Go to Solution.
12-19-2019 03:27 AM - edited 12-19-2019 03:28 AM
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…
12-19-2019 04:00 AM
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.
12-21-2019 08:15 AM - edited 12-21-2019 08:26 AM
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.
12-22-2019 11:17 PM
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.
12-22-2019 11:18 PM - edited 12-22-2019 11:20 PM
Thank you to all for your all valuable suggestions.
12-23-2019 06:14 PM
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.
mcduff