LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically reordering controls visually (forward & back) on front panel

Do we assume Mahyar is a spambot and try a Turing test? Smiley Frustrated

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 21 of 36
(1,648 Views)

James, Thanks for your wise response; however, it's not a nice way of reordering controls in Z direction. You probably know that it is done using a line of command in Visual Studio, or using windows API, but in labview we need to use magic wand! Using two VIs with a hell of precautions is not nice. I've already received my answer, but thanks anyway.

Besides, you may assume whatever you need, but be watchful about what you say. These are not from a spambot. 

0 Kudos
Message 22 of 36
(1,620 Views)

I have a similar thing that needs to be done - I need to programatically move controls from front to back & vice versa(not just hiding. Controls needs to be still be visible).

 

Original:

Overlap Original.png

 

Desired Effect(via programatically, without scripting):

Desired Effect.png

 

Please find the sample VI(2013) attached(had tried to get this approach, by changing the order of setting visibility for each control).

 

James,

I also tried doing via your method(VI not running, and using another VI to set the control properties of the original VI), but without success. If possible, could you please post a sample VI of your method? 

 

Thanks,

Karthik

------
Using LabVIEW since 2012. Certified LabVIEW & TestStand Architect
0 Kudos
Message 23 of 36
(1,606 Views)

any reason why you cant just place the controls in different tabs of a tabe control and flick between the pages to 're-order" Karthik?

(My specific requirement was to show some controls some of the time and block access to controls which were overlaid ontop of other controls which were not visible.)

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 24 of 36
(1,596 Views)

Thanks for your reply James.

 

My requirement is a bit more complicated - I need to allow users to move controls at run time, with the option to control the overlapping order of controls.

------
Using LabVIEW since 2012. Certified LabVIEW & TestStand Architect
0 Kudos
Message 25 of 36
(1,579 Views)

As has already been specified in this thread, the Order cannot be changed whrn the VI is running, so it needs to be changed from another VI to avoid the VI being running when the order is changed. I don't think you are going to be able to achieve your requirement as from what I understand, the order you wish to be set will only be known once the VI is already running!!

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 26 of 36
(1,539 Views)

How about when the VI isn't running? In my case I have a VI that populates a blank, non-running VI with generated objects, and due to the specific order in which objects are placed I end up covering objects with what should be background decorations.

______________________________________________________________


______________________________________________________________
0 Kudos
Message 27 of 36
(1,509 Views)

@Gazebo wrote:

How about when the VI isn't running? In my case I have a VI that populates a blank, non-running VI with generated objects, and due to the specific order in which objects are placed I end up covering objects with what should be background decorations.


Found a way! By using VI scripting, set the 'Selected' property nodes to true of the objects you want to order, and simulate a Ctrl-Shift-J keypress to send the items to the back. 

Obviously this only works when the VI is in edit mode, but there you go.

______________________________________________________________


______________________________________________________________
Message 28 of 36
(1,488 Views)

How did you simulate a Ctrl-Shift-J ?

0 Kudos
Message 29 of 36
(1,469 Views)

@RavensFan wrote:

How did you simulate a Ctrl-Shift-J ?


After a quick search I found this VI. 

http://forums.ni.com/t5/LabVIEW/simulate-arrow-key-events-in-labview/td-p/813477

 

keypress.png

______________________________________________________________


______________________________________________________________
Message 30 of 36
(1,456 Views)