what happening when resize the window?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

what happening when resize the window?

m.reg380
Hi,
In my code,i use wx.ScrolledWindow,and call SetTargetWindow() to make it scroll the child window.
when i scroll it,and then resize the window,there are some space in the left,it seems that it scrollWindow() twice?
images:
first,scroll the window:

then,resize the window:

there are space in the left:


what's the matter with it ? and how to fix it?

my os is win 10 64-bit,python 3.6.3,wxPython 4.0.0b2

thanks



--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

grideditor1.py (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: what happening when resize the window?

Tim Roberts
On Dec 16, 2017, at 7:17 AM, [hidden email] wrote:

In my code,i use wx.ScrolledWindow,and call SetTargetWindow() to make it scroll the child window.
when i scroll it,and then resize the window,there are some space in the left,it seems that it scrollWindow() twice?

Not sure, it seems to work fine on MacOS when I change your EditGrid.OnSize to this:

    def OnSize(self,evt):
        w,h = self.GetClientSize()
        h = h-30 if h-30>0 else 0
        self.head.Move((0,0))
        self.head.SetSize((w,30))
        self.body.Move((0,30))
        self.body.SetSize((w,h))
        evt.Skip()
— 
Tim Roberts, [hidden email]
Providenza & Boekelheide, Inc.

--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what happening when resize the window?

m.reg380
It doesn't work fine on msw,maybe there are some bugs on msw?
thanks all the same.

在 2017年12月17日星期日 UTC+8下午4:05:50,Tim Roberts写道:
On Dec 16, 2017, at 7:17 AM, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="uB_tAdYKAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">m.re...@... wrote:

In my code,i use wx.ScrolledWindow,and call SetTargetWindow() to make it scroll the child window.
when i scroll it,and then resize the window,there are some space in the left,it seems that it scrollWindow() twice?

Not sure, it seems to work fine on MacOS when I change your EditGrid.OnSize to this:

    def OnSize(self,evt):
        w,h = self.GetClientSize()
        h = h-30 if h-30>0 else 0
        self.head.Move((0,0))
        self.head.SetSize((w,30))
        self.body.Move((0,30))
        self.body.SetSize((w,h))
        evt.Skip()
— 
Tim Roberts, <a href="javascript:" target="_blank" gdf-obfuscated-mailto="uB_tAdYKAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">ti...@...
Providenza & Boekelheide, Inc.

--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.