LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit Panel Resize to One Dimension?

Is there an easy way to limit panel resizing to a single dimension? That is, can I make a front panel that allows resizing the HEIGHT but not the WIDTH?

 

What would be nice is if there was a way to set the "VI Properties>>Window Size" MAXIMUM size along with minimum (default to <Inf>). But I would settle for a programmatic way to do it, too. I tried making a UE to catch the <Panel: Resize> event, and replace the "Left" and "Right" bounds of the NewBounds with those of the OldBounds, but that ended up doing some wonky stuff.

 

Anyone out there found a solution for this problem?

 

[I should add, I'm still running LV 8.6.1...maybe this has been addressed in later versions?]

0 Kudos
Message 1 of 3
(3,359 Views)

I'm pretty sure that there isn't, as I don't think Windows supports it and resizing windows is presumably handled by it.

 

If there's a window message associated with the resize, you might be able to intercept it using some platform-specific code, but that's beyond the realm of my own experience.

 

One thing you can try to do is disable the resizing completely and then add your own resizing logic and code (such as buttons near the edge which will expand or compact the UI by X pixels). I think this is what you usually see in programs which allow expanding in only one direction (although usually the buttons expose an entire pane at once).


___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(3,343 Views)

Look at this thread.

0 Kudos
Message 3 of 3
(3,338 Views)