LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control resized when replaced

Any reason why controls don't maintain their size when replaced with the same type control? For example, I can replace a System OK button that's been resized with the same System button and while most properties are maintained, e.g., label, caption, boolean text, etc., size is not, instead the new control is created at its default size.

 

I'm sure this has been observed by many others, I was just wondering why and if there is a way to maintain size when replacing (and not at run-time using container bounds properties).

 

I'm trying to replace controls with "themed" equivalents and don't want to have to move everything back into place.

 

Somehow I get the feeling this is a dumb question or the answer is casual to the most obvious observer.

Message Edited by Bill@NGC on 07-18-2009 12:00 AM
0 Kudos
Message 1 of 5
(2,514 Views)

I recall this having been brought up before quite a while ago, but I don't remember whether it was here, on info-labview, or on LAVA. I think part of the reasoning at the time was that all Boolean controls are just that: Boolean controls, and there's no real way to tell what the "correct" size should be if you replace it with another Boolean control, so the "safe" thing to do was to use the default size. It wasn't a very good argument, but I honestly don't recall any more than that.

 

You can always submit a suggestion to the LabVIEW Idea Exchange

 

There was an old tool from OpenG called "Copy-Paste Boolean Attributes", though I never used it.

 

One thing that confuses me about part of what you said:


Bill@NGC wrote: 
I was just wondering why and if there is a way to maintain size when replacing (and not at run-time using container bounds properties).

Are you asking about replacing them at run-time?

 

Message 2 of 5
(2,499 Views)

No, I wanted to avoid using a run-time solution if possible.

0 Kudos
Message 3 of 5
(2,492 Views)

I agree this is somewhat unexpected behavior. Many items retain their size when replaced (try e.g. replacing a chart with a graph).

 

The current behavior leads to some odd behavor. For example place an OK button and make it bigger. Now replace it with a cancel button. Intuitively, you would expect something with a red text and different label, but you get an OK button at the original size, because all labels and decorations are retained.

 

OTOH, if you replace a waveform graph with a waveforem chart, the name changes as expected, unless the name has been modified from the default.

 

I would prefer the same for booleans: Labels, captions, boolean texts, mechanical action, etc. should only be retained if the are different from the default.

 

Maybe you want to polish this up this discussion and submit it as an idea in the new LabVIEW Ideas exchange. 🙂

 

 

Message Edited by altenbach on 07-18-2009 09:37 AM
0 Kudos
Message 4 of 5
(2,482 Views)
Will put together something and submit it. Thanks.
0 Kudos
Message 5 of 5
(2,473 Views)