LabVIEW Idea Exchange

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

Align objects should not align increment/decrement buttons

Status: New

Re-opening because LabVIEW NXG has been discontinued.

 When you align a control that has increment/decrement buttons to other objects on the front panel that do not have them, LabVIEW aligns the buttons with the edge of the other controls.  The align objects command should ignore the increment decrement buttons and align the border of the control with the borders of the other controls.
 
 align.jpg
 
Workaround:  Hide Inc/Dec Buttons, align objects, Show Inc/Dec buttons.  However not as convenient.
16 Comments
AristosQueue (NI)
NI Employee (retired)

Different alignment methods in LV have slightly different behavior because no one can agree on a particular alignment being correct for all cases.

 

The alignment grid uses the "master rectangle" of a control -- in the case of numerics, that's the text box, ignoring the inc/dec arrows. The Align menu uses the "bounding rectangle" -- in the case of numerics, that's all the parts. Having the two different rules for alignment for these two different features makes it easier to align by one or the other depending upon circumstances. Sure, when you're aligning a numeric control to a numeric indicator, you probably want the text boxes to line up directly -- so use the alignment grid (shift+arrow key makes it easy to align in this case). If you're aligning a numeric up against the edge of a boolean button, you probably want the inc/dec arrows aligned with the edge of the boolean button, so use the Align tool.

 

Trying to have both tools support all possible desired modes made both tools unusable, so the decision was made years ago to have the different paradigms. Although there was some concern that having the different rules would be confusing, it has turned out in practice to be generally understandable to customers and definitely makes laying out a front panel simpler.

JackDunaway
Trusted Enthusiast

Here's another annoyance that is linked to alignment and the "Master Rectangle". Notice in my first illustration, steps 3 and 4 will not properly re-align because their Master Rectangle stays wide because the labels don't reposition themselves.

AristosQueue (NI)
NI Employee (retired)
Jack: I think you mean the "bounding rectangle," not master rectangle. The master rect should be unaffected with all of these changes and doing alignment using the grid should align them the same. Aligning with the Align menu will have the problems you point out. Having said that, changing the behavior of labels is not really related to this idea... suppose that LV did move the labels automatically when you hide some parts. If I then manually moved the label back out into to its "edge of cliff" position, the alignment rules as written today would still apply: the Align menu would use the bounding rect and the grid would use the master rect.
Manzolli
Active Participant
Liked, but as an option.
André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil
Davidek
Active Participant

Something along the same lines happens on the block diagram. Try to align a VI with a Polymorphic VI selector with another VI. It doesn't align according to the icon bounds, but according to the selector box bounds. (workaround is to hide the selector box)

align polymorphic.PNG

altenbach
Knight of NI

> (workaround is to hide the selector box)

 

... or align the centers. 🙂 

RandyP
Member
Here's another workaround (though it doesn't work in all cases):

1. Pull the string control over to the right so its left edge is further right than the left edge of the numeric box.

2. Shift-click the string and the label of the numeric.

3. Run the Left-Align command. LV will use the left edge of the label (which is often also the left edge of the numeric box) as the align-point for the left-alignment.

4. Move the pair as a group to the desired location.

 

This obviously has some caveats, the main one being that the label of the numeric is pinned to the left edge of the numeric box.

Message Edited by RandyP on 01-19-2010 09:03 AM
-Randy
-=--=-=-=-=-=-=-
Nothing like a good dose of LabVIEW to cure what ails ya'.
crelf
Active Participant
I agree that it's sometimes a pain (I spend time hiding components, aligning, and re-showning components), but I think that having different rules for different UI elements is unintuative.




Copyright © 2004-2021 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
kdmcmullan
Member

Where would you propose to align items which have the radix displayed?

 

If items are array items, or arrays of clusters, the non-alignment of the up/down controls does not necessarily cause teh test potion of the control to become aligned. Do you have a suggestion as to how to handle these instances?

 

David_L
Active Participant

Not really sure what you mean.  Can you give an example image?