El 11/02/11 18:34, Ed Leafe escribió:
>
>
>> What I want is the form to fit to sizer only if the user has not
>> expressed other preferences (i.e. has not changed the form's original
>> size), if the user changed the size I want the form to keep the user's
>> choices.
>> The behaviour it has in afterInit() is ideal, except for the fact that
>> extraWidth has no effect. Is there some other method that fires before
>> restoreSizeAndPosition() but *only* at startup that I might use?
>
>       Why not override restoreSizeAndPosition() as follows:
>
> def restoreSizeAndPosition(self):
>       currSize = self.Size
>       currPos = self.Position
>       super(YourClass, self).restoreSizeAndPosition()
>       if (currSize == self.Size) and (currPos == self.Position):
>               # Nothing changed
>               self.fitToSizer()
>

Yes, I guess it would work. But it's easier and, in my opinion, more
understandable to place the fitToSizer() call in the afterInit() method,
forget about extraWidth and set the form's MinimumWidth in initProperties().

Thanks anyway.

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to