LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to allow FP resizing only in one direction

Hello! Is there any simple way how to preven changing the width of VI? Just to write the old coordinates of left and right doesn't work very good. Thanks
LV 2011, Win7
0 Kudos
Message 1 of 11
(4,890 Views)

Hmm, yes! That certainly acts weird!

 

(It behaves a little better with the scrollbars off, but still does not work right).

0 Kudos
Message 2 of 11
(4,867 Views)

The problem is due to the fact that while the FP is resized, multiple resize events are fired. As explained in the LV help, an additionnal event occurs when you stop resizing, resulting in NewBnds = OldBnds.

So the idea is now to store the initial OldBnds when you start resizing, and to restore the stored data when you stop. As shown in the attached VI.

The cluster wire coming from the left is a small refinement to take into account  the presence of the panel scroll bars (what a lack of coherence here between the panel bound definitions !  😞

 

Message Edité par chilly charly le 01-05-2009 11:30 PM
Chilly Charly    (aka CC)
Download All
Message 3 of 11
(4,837 Views)

Hi ceties,

 

The fundamental problem is that there is not a Filtered Event option for Panel Resize. Therefore we are forced to deal with resizes after the fact with no ability to "filter out" requests that we don't want.

 

I have not found a way to make it look good - you will get some flashing as the panel is resized. Be aware that the Maximize button on the front panel will also call the Panel Resize event.

 

As CC illustrated, if you capture the FP Bounds before you start your loop, it sort of works.

 

I would really like National to add a Filtered Event option to Panel Resize.

 

steve

 

 

 

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 11
(4,822 Views)
Hello and thanks for your suggestion of you all. May I ask you CC if you could save it in 8.5? And I agree with Stevem that something like 'resize?' event with discart option would be nice.
LV 2011, Win7
0 Kudos
Message 5 of 11
(4,798 Views)

Here we go....

 

 

0 Kudos
Message 6 of 11
(4,794 Views)
thanks!
LV 2011, Win7
0 Kudos
Message 7 of 11
(4,792 Views)

Try Resize Configure .

It uses external code to prevent user resize the panel.  One can enable/disable resize on left, top, right, or bottom edge independently.

For example, allow resizing on bottom edge only, no resize on top, nor left/right.  Notice the cursor will change if resize allowed.

 

The method prevent resize.  Better than allow resize, and then resize back to original size.

 

 

George Zou

http://www.geocities.com/gzou999

 

 

Message Edited by zou on 01-06-2009 09:54 AM
George Zou
Message 8 of 11
(4,752 Views)
Nice work George as usually. But as usually not for free or with included messagebox 😞 I would like to know how you do this witchcraft 🙂
LV 2011, Win7
0 Kudos
Message 9 of 11
(4,728 Views)

ceties wrote:
Nice work George as usually. But as usually not for free or with included messagebox 😞 I would like to know how you do this witchcraft 🙂

 

Take a look this thread:

http://sthmac.magnet.fsu.edu/infolabview/ILVDigests/2008/06/30/Info-LabVIEW_Digest_2008-06-30_001.ht...

 

 

George Zou

http://www.geocities.com/gzou999

 

George Zou
0 Kudos
Message 10 of 11
(4,719 Views)