[wxPython-dev] Re: extra sized dialogs under win32
Robin Dunn
robin at alldunn.com
Mon Aug 7 11:10:29 PDT 2006
Robin Dunn wrote:
> Tim Tucker wrote:
>> I'd thought about posting on this myself. Would have replied sooner,
>> but apparently my subscription to the list was no longer active.
>>
>> I think I've tracked down the difference that's causing dialogs to
>> show up larger than they should, though.
>>
>> In wxPython 2.6, these seemed to be pretty much equivalent:
>>
>> Method A:
>> self.SetSizer( sizer )
>> self.Fit()
>>
>> Method B:
>> self.SetSizerAndFit( sizer )
>>
>> In 2.7, however, Method B results in the same size as under 2.6, but
>> Method A results in a larger size.
>>
>> Not sure why the difference is there, but that does seem to be the
>> difference.
>
> Thanks for reminding me about this issue. I forgot to mark the original
> email so it slipped my mind.
>
> The difference is that in 2.7 wxWindow::Fit calls SetClientSize instead
> of SetSize. But the sizers take into account the difference between
> size and client size so Fit really should be using SetSize... I'll see
> what I can do.
>
BTW, the equivalent to the 2.6 Fit would be to call
self.SetSize(self.GetBestSize()). SetSizerAndFit actually calls
sizer.Fit not window.Fit, so it has a bit different results (the
window's min size will be set, etc.)
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-dev
mailing list