From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pane Size event

I have noticed (what seems to be) different behavior for the Pane Size event between 2013 and 2016.

 

This is the behavior I am seeing with seperate vi's on seperate machines:  In 2016, the event happens while the user actively drags the window size larger or smaller.  In 2013, the event happens only when the user finishes dragging the window size.

 

My question is: is there a vi setting that I am missing to set the window resize behavior?

0 Kudos
Message 1 of 7
(3,611 Views)

Using 2013 and 2016 LabVIEW on the same Windows 7 machine, I was only able to see the behavior from the Pane Size event structure after finishing the drag for window size, not actively as you mentioned. Are you using the same operating system for both?

Is there anyway to include a section of code that demonstrates the behavior you are seeing? Including the sections of code for both would definitely help verify the behavior you are seeing.

 

 

Best,

 

Chris Daughters

Applications Engineer

National Instruments

0 Kudos
Message 2 of 7
(3,528 Views)

I do not have LV2013, but I see the same behaviour with LV2015 and 2016 what is described by the OP. During drag, I get continuous events fired, not only when I release the mouse button to stop the resizing...Actually when you move the pane fast, it looks like it only fires the event when you stop the movement, but I guess it is just about the speed. If you move it slow, it continuously fires the events...

OS: Win10 x64, LV2015/2016 32bit.

Snippet:

event1.png

 

Video:

https://www.youtube.com/watch?v=qaNULloNKS0

 

Message 3 of 7
(3,510 Views)

LV 2016 states the following for the Pane Size Event:

Because LabVIEW may generate multiple Pane Size events while you resize the pane, LabVIEW generates a final event at the end of the resizing operation in which OldBnds and NewBnds return the same value. You can use the values to identify in the code when the sizing operation finishes.

 

I am not aware if that changed between 2013 and 2016 and if it did, in which version. However, some minor changes to the code will enable you to only execute stuff when resizing of the pane is finished.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 7
(3,503 Views)

@Norbert_B wrote:

LV 2016 states the following for the Pane Size Event:

Because LabVIEW may generate multiple Pane Size events while you resize the pane, LabVIEW generates a final event at the end of the resizing operation in which OldBnds and NewBnds return the same value. You can use the values to identify in the code when the sizing operation finishes.

 

I am not aware if that changed between 2013 and 2016 and if it did, in which version. However, some minor changes to the code will enable you to only execute stuff when resizing of the pane is finished.

 

Norbert


Nice "trick", I will keep in mind!

 

ssss.png

 

0 Kudos
Message 5 of 7
(3,491 Views)

So what I have found is that LV2013 does fire off multiple events during a drag resizing -- I was just moving too quickly as Blokk noted previously.

 

I am now finding an issue with how the pane is resized.  When the user maximizes the window from the title bar, the pne size event only triggers once and results in the previous (OldBnds) and the current (NewBnds).  Because of this, I am having difficulty distinguishing which event has taken place.  My existing vi for handling the size change is looking for the old=new before doing stuff, and so it does nothing when the user maximizes the window.

 

any suggestions?

0 Kudos
Message 6 of 7
(3,412 Views)

Never mind... I just realized that I can get the window state through a vi reference and handle the maximized condition different.

0 Kudos
Message 7 of 7
(3,409 Views)