LabVIEW Idea Exchange

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

XControl resizing coupled to underlying control

Status: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.

Many of the standard controls, e.g. Numerics, only allow uni-directional (horizontal) resizing, and provide the appropriate Grow Handles to only allow this.  I'd like an XControl to inherit this ability from the underlying control, or at least to provide the option of only showing horizontal grow points.

NumericGrow.png

 

7 Comments
altenbach
Knight of NI

What should happen if it needs to resize vertically due to a change in font size?

 

Are you talking about edit time resizing only, or also about the behavior at run time when it is set to scale with the pane? (in this case there are no handles).

 

Also remember that these numeric controls can have mutiple lines if the advanced formatting is used.

GregSands
Active Participant

altenbach wrote:

What should happen if it needs to resize vertically due to a change in font size?

 

It should behave the same way as the underlying control (see here: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/XControl-Font-changes/idi-p/2000077 ).  Font changes don't affect the available grow handles.

 

Are you talking about edit time resizing only, or also about the behavior at run time when it is set to scale with the pane? (in this case there are no handles).

 

Edit-time resizing - as far as I know, grow handles are not available at run-time.

 

Also remember that these numeric controls can have mutiple lines if the advanced formatting is used.

 

Again, that doesn't affect the grow handles.  I get the impression that my title doesn't adequately describe what I'm saying in the description and picture - if a moderator wants to change it to "XControl Resize Grow Handles coupled to underlying control" that may help!

 

altenbach
Knight of NI

I don't see the point. Since it is at edit time only, you can simply not use the other handles. My typical Xcontrols contain more than a simple numeric and in all typical cases the resizing should work in all directions. 

 

If such a control is set to scale with the panel, it will still only resize horizontally. I was wondering if that behavior should be inherited too, because it is directly related. That's what I meant.

 

 

GregSands
Active Participant

altenbach wrote:

I don't see the point. Since it is at edit time only, you can simply not use the other handles. My typical Xcontrols contain more than a simple numeric and in all typical cases the resizing should work in all directions. 

 

This idea came about while creating a very simple XControl showing a Numeric with units (I was wanting to restrict the ability of the user to change the units!).  But I might have thought it even more useful for more complex XControls -- what if you could retain (or override or augment) the resize behavior of all controls in the XControl.  Say if one of the controls is a graph, it's much more useful to be able to resize the graph area than just the whole panel. (OT: "simply not use it" made me think of this!).

 

If such a control is set to scale with the panel, it will still only resize horizontally. I was wondering if that behavior should be inherited too, because it is directly related. That's what I meant.

 

Yes, that makes sense too.

AristosQueue (NI)
NI Employee (retired)

I certainly see the value of being able to have horizontal-only or vertical-only or circular grab handles on the XControl, but tying it to the underlying control would not be a good thing in my opinion. When I build an XControl, the behavior of the XControl rarely has anything to do with the one OR MORE controls that make up that control's facade VI. If you want this ability, I'd suggest a new method on the XControl that returns what kind of grow handles the XControl should have, which might change based on the XControl's state value, just as some built in controls change (for example, the 1D Array control is growable in all directions unless it has already been grown in one direction, in which case, it only permits growth in that direction).

Sniper_435
Member

I was just looking for how to do exactly this, the reason being I'm making a custom variation on a slide control and need to be able to block the user from scaling it vertically (it's a horizontal slide).

As things stand I can't find any way to block this but allow the user to resize horizontally.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 5 kudos within 5 years after posting will be automatically declined.