Re: TabControl size
- Posted by Derek Parnell <ddparnell at bigpond.com> Apr 26, 2002
- 364 views
Just an idea, but are you defining your toolbars and statusbars before you create other controls on the window? The recommendation is that one creates a window, then any toolbars, then the statusbar and then the other controls. This is because create() tries to use the client area to place controls in, but it can only do that if toolbars and statusbars are already created, since they reduce the client area. Here is some sample code that seems to work okay on my machine: ----------- without warning include win32lib.ew integer win, tc, ti procedure pb(integer self, integer event, sequence parms) setCtlSize(tc,{0.99,-5},{0.99,-25}) end procedure win = createEx(Window, "Test Tabcontrol", 0, 0, 0, 640, 480, 0, 0) tc = createEx(TabControl, "", win, 5, 25, {0.99,-5}, {0.99,-25}, 0, 0) ti = createEx(TabItem, "One", tc, 0, 0,0, 0, 0, 0) setHandler(win, w32HResize, routine_id("pb")) WinMain(win, Normal) ----------- Derek. ----- Original Message ----- From: <petelomax at blueyonder.co.uk> To: "EUforum" <EUforum at topica.com> Sent: Thursday, April 25, 2002 1:44 PM Subject: TabControl size > > I tried SetCtrlSize(TABC,0.99,0.99) and the resulting control was much > smaller than the window, after some experimenting I found that > SetCtrlSize(TABC,1087,778) produced the right size (allowing for > title, scroll and status bars) on a 1024 x 768 screen. Seems a bit odd > having to specify 63x10 more pixels than there are on the screen? > > Using the 29th March 0.57.1 lib. > > Pete > > >