El 11/02/11 14:55, Ed Leafe escribió: > On Feb 11, 2011, at 11:42 AM, Ricardo Araoz wrote: > >> Inside a form's afterInit() method tried >> self.fitToSizer(extraWdith=200), I supposed it would resize the form to >> the size required by it's sizer plus 200 pixels but it just resized it >> to the sizer's required size. >> Solved it by adding self.MinimumWidth = 200 in self.initProperties(), >> but though I should report the issue here. > > afterInit() fires after the form has been created, but before anything > contained in the form has been created. You should probably use > afterInitAll(), which fires after all the objects contained by the form have > been created.
Yes, I tried placing fitToSizer(extraWdith=200) in the afterInitAll() method and it works as expected, but there is a catch though. When I place fitToSizer() in afterInit() if the user has modified the form's geometry it will adopt the last used size and position, but if it is the first time it has been run then the form will default to it's sizer's requirements. OTOH if I place it in afterInitAll() it will *always* adopt the sizer's requirements no matter what daboprefs might say. _______________________________________________ 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]
