LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
JackDunaway

Programmatic Manipulation of Object Layer (z-order)

Status: New

Unfortunately, we ran into issues with rearranging the Z-order of controls at run-time, and have decided to pause development of this feature.

I would like to be able to change the z-order of FP Objects programmatically. For starters, I envision the following properties:

 

  1. Layer - Explicitly sets the z-order layer in which an object resides.
  2. Promote/Demote - Implicitly sets z-order layer by -1 or +1 (assuming Layer 0 is frontmost)
  3. Send to Back/Send to Front - Explicitly sets z-order to the foremost or rearmost layer
  4. (Optional) Container property "Layers" - Returns an array of all layer indices currently in use by the container (Page, Panel, Cluster, etc.)
  5. (Optional) Container method "Layer.Objects" - Returns array of references to all objects on a layer
 
ControlLayers.gif
 
Question at this point: can more than one object reside on a layer, or should each object represent a discrete z-order? Does changing the z-order of one object likewise affect the z-order of other objects? Discuss in the comments.

 

15 Comments
JonP
Member

The most common case, as in the OP's example, is probably that you want to swap the z-position of 2 controls. If so this could be done in a single call to a VI method passing in references to the two controls. There is no need to know anything about "layer" numbers, internally the existing z number of the 2 controls is just swapped.

You would also need an interface to ask if control ref A is in front of ref B in order to detect whether or not to swap them.

Christina_R
Active Participant
Status changed to: In Development
 

Christina Rogers
Principal Product Owner, LabVIEW R&D
wiebe@CARYA
Knight of NI

Will this new feature work only when VIs are idle, or also when VIs are running?

 

Changing this for running VIs would definitely open possibilities.

Christina_R
Active Participant

The feature under development is inspired by this Idea, but not exactly the solution that was proposed. It will, however, enable you to change the z-order of controls on running VIs!

 

Unfortunately, though, it's likely that rearranging the z-order of controls within a cluster will not be included with this feature's initial release. We're planning to support panes and tab control pages.


Christina Rogers
Principal Product Owner, LabVIEW R&D
Christina_R
Active Participant
Status changed to: New

Unfortunately, we ran into issues with rearranging the Z-order of controls at run-time, and have decided to pause development of this feature.


Christina Rogers
Principal Product Owner, LabVIEW R&D