08-13-2010 07:52 PM
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?]
08-14-2010 02:12 PM
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).
08-14-2010 02:24 PM
Look at this thread.