Win32lib 0.57.1 - Status bar fields
- Posted by Mike <vulcan at win.co.nz> Mar 29, 2002
- 434 views
Hi Derek, Nice work with Status bar fields. Didn't see much documentation about it but I did figure out how to use it and I have written this simple demo. A few things though.. 1 The status bar is inside the horizontal window scrollbar. A similar phenomenon is noticeable with a tool bar and a vertical window scrollbar. 2 Changes.htm refers to makeSubFields() but it should be setSubFields() 3 Perhaps the 2nd parameter could be the relative lengths of each field rather than accumulative lengths. 4 If the total length of the status bar fields is less than the client width the status bar does not span the window. Perhaps something could be done about this too, maybe? -- Statusbar fields demo without warning with trace include win32lib.ew global constant MAIN = create( Window, "Status bar demo - move & click mouse", 0, 56, 44, 592, 200,WS_HSCROLL + WS_VSCROLL ), STATUSBAR = create( StatusBar, "", MAIN, 0, 0, 0, 0, 0 ) -- specify the length of the divisions within the status bar -- NB: These values refer to the end point/pixel of each division and -- NOT specific lengths setSubFields(STATUSBAR, {50, 245,350, 1000}) procedure onMouse_MAIN(integer a, integer b, integer c, integer d) setText(STATUSBAR, a) -- notice 1st param dont need field specifier as it is field 0 setText({STATUSBAR,1}, b) setText({STATUSBAR,2}, c) setText({STATUSBAR,3}, d) end procedure onMouse[MAIN] = routine_id("onMouse_MAIN") WinMain( MAIN, Normal )