after Maximize(True), how to get actual frame/panel size

My window default size is (800600)
after Maximize(True), window extend to full screen.
when I get frame/panel size, It’s also (800
600). different from actual size value.
Now, How to get actual size value.

Thanks

You can catch the Maximize event and use self.GetSize() to get the size of the frame. The panel should automatically expand to fill the frame if it’s the sole child. If it’s not, then you will have to add it to a size with a proportion of one or greater and apply the wx.EXPAND flag.

Occasionally I’ve seen widgets not resize quite right when maximizing the window and I think I’ve had to call wx.CallAfter(self.Layout) to fix that.

  • Mike
···

On Wednesday, April 23, 2014 11:20:14 PM UTC-5, luckrill wrote:

My window default size is (800600)
after Maximize(True), window extend to full screen.
when I get frame/panel size, It’s also (800
600). different from actual size value.
Now, How to get actual size value.

Thanks

thanks, linux have this issue.
windows no this issue, getsize always right.

for linux, I now use wx.DisplaySize() at first, big then actual window/panel size.

after window/panel be expand once(draw image), second time, the size value is right.

thanks

···

2014-04-24 23:11 GMT+08:00 Mike Driscoll kyosohma@gmail.com:

On Wednesday, April 23, 2014 11:20:14 PM UTC-5, luckrill wrote:

My window default size is (800600)
after Maximize(True), window extend to full screen.
when I get frame/panel size, It’s also (800
600). different from actual size value.
Now, How to get actual size value.

Thanks

You can catch the Maximize event and use self.GetSize() to get the size of the frame. The panel should automatically expand to fill the frame if it’s the sole child. If it’s not, then you will have to add it to a size with a proportion of one or greater and apply the wx.EXPAND flag.

Occasionally I’ve seen widgets not resize quite right when maximizing the window and I think I’ve had to call wx.CallAfter(self.Layout) to fix that.

  • Mike

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


jiang zhixiang