[wxPython-users] Re: action on resize main window ?
Stef Mientki
s.mientki at ru.nl
Sun Jun 3 07:21:24 PDT 2007
Christian K wrote:
> Stef Mientki wrote:
>
>> hello,
>>
>> I've the following situation
>>
>> Frame
>> |___ SplitterWindow
>> |____ Editor
>>
>>
>> Now I want to resize the Editor, so it always fits into a certain part
>> of the SplitterWindow.
>>
>> So I catch the Splitter changing, which works perfect
>>
>> self.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED, self.OnSplitter)
>> def OnSplitter (self, event):
>> ( w, h ) = self.Splitter.GetClientSize()
>> w = self.Splitter.GetSashPosition()
>> self.Code_Editor.SetClientSizeWH ( w - 22, h - bh - 23 )
>>
>> Now I also want to catch the resize of the total window (Frame), by
>>
>> self.Bind ( wx.EVT_SIZE, self.OnResize )
>> def OnResize (self, event):
>> ( w, h ) = self.Splitter.GetClientSize()
>> w = self.Splitter.GetSashPosition()
>> self.Code_Editor.SetClientSizeWH ( w - 22, h - bh - 23 )
>>
>> But then the automatic resizing of the SplitterWindow is lost.
>>
>
> This sounds like putting 'event.Skip()' somewhere in your event handler should help.
>
thanks Cristian,
but it just gave compiler errors :-(
I tried to insert the skip event in the Resize Handler,
event.skip()
AttributeError: 'SizeEvent' object has no attribute 'skip'
I assume also that I've to do the skip only in certain cases,
am I right ?
cheers,
Stef Mientki
> Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
>
>
More information about the wxpython-users
mailing list