El 11/02/11 16:30, Ed Leafe escribió: > On Feb 11, 2011, at 2:07 PM, Ricardo Araoz wrote: > >> 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. > Well, that's kind of what 'fitToSizer()' means: fit the form to the > sizer, not to default settings. When you have it in afterInit(), it fires > before the call to restoreSizeAndPosition(), so the latter call "wins". When > you have it in afterInitAll(), it gets called after, so it wins. > > So I'm not really sure what you're going for: do you want it fit to the > sizer's requirements, or to the user's last setting?
Both? hehe 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? _______________________________________________ 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]
