Re: Toolbar and Statusbar
- Posted by Brian Broker <bkb at CNW.COM> Jan 23, 2001
- 471 views
On Tue, 23 Jan 2001 07:19:21 +1100, Derek Parnell wrote: >Hi win32lib developers, >just a bit of advice. > >I recommend that any toolbar and statusbar controls be created immediately after their parent window is created. > >This is because these control types effect the location of the Client Area. And as the X,Y parameters on the create() function are relative to the client area, you could get "misplaced" controls if you create some before the toolbar/statusbar and some after the toolbar/statusbar. > >Thanks to Judith for discovering this effect. > >I suppose a workaround inside win32lib would be to automatically adjust the location of controls created before a toolbar/statusbar - but that just might cause other side-effects. > >------ >Derek Parnell >Melbourne, Australia >(Vote [1] The Cheshire Cat for Internet Mascot) On a similar note, you cannot use 'setClientRect' on a window with a menu before that window is drawn (e.g. if it's in your 'onOpen' routine). I've found that it's height will end up being a menu-bar-size too short. (no problem if it's used *after* your window is drawn.) -- Brian