10-27-2015 08:49 AM - edited 10-27-2015 08:50 AM
Hello all,
I have two arrays expanding depending on the values. If the arrays contain a lot of elements, these two arrays overlap, please see below images.
How can I keep the distance between those two arrays same, in order to avoid overlapping? These arrays are in a tab.
Cheers,
Palazzo
Solved! Go to Solution.
10-27-2015 09:09 AM - edited 10-27-2015 09:12 AM
You can do this programmatically, but not in development mode. If the arrays are expanding depending on the values, does that happen programmitcally?
You can pull a control's location and bounds using a property node. There's a section of properties in the list that contains Position, Bounds, Master Bounds Rectangle, etc. that can tell you all the info you need to offset the second array. You should be able to pull the Bottom value from Master Bounds Rectangle, add an offset, and set the Position of the second array.
Give this a try:
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-27-2015 10:01 AM - edited 10-27-2015 10:05 AM
Nice... Thanks James. I have couple of front panel images and texts which I use as labels-captions though. I have to put them into picture ring or something to use position property...
I use "Group" tool a lot, that's why I was asking about the "distance" actually, not control positions... Anyways, I am not willing to get lost into this, thanks for your reply.
10-27-2015 10:05 AM - edited 10-27-2015 10:07 AM
Ah, yeah that's one disadvantage. I think it's an oversight by NI that grouped Front Panel items don't move together when positioned programatically like this.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-27-2015 10:09 AM - edited 10-27-2015 10:09 AM
Nevermind! I just realized you can do what you're trying to do using a customized control. Right click your array and go to Advanced >> Customize. Within this control front panel, you can add your caption texts, or images, or whatever and they will always move with the control just like a caption. You don't even have to save the control to file unless you want to duplicate the added captions elsewhere.
(I posted a second reply, so that OP doesn't miss the edit.)
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'