1. RE: Status Bar

Robsz2 at aol.com wrote:
> Hello ALL.
> 
> How can I make a statusbar shorter than the full length of a window  
> and/or  
> split it up into multiple sections?
> 
> Thanks.
> 
Using the version 0.57 of win32lib, you can do this:

   Sb = createEx(StatusBar, "", theWin, 0, 0, 0, 0, 0, 0)
   -- Define three statusbar panels whose right-most edge
   -- is at 200 pixels, 260 pixels and 400 pixels respectively
   setSubFields(Sb, {200, 260, 400})

   -- Write to 1st panel
   setText({Sb,1} , "One")
   -- Write to 2nd panel
   setText({Sb,2} , "Two")
   -- Write to 3rd panel
   setText({Sb,3} , "Three")
----------

Note that if you want the rightmost panel to extend across the window, 
specify an edge value of -1.

Due to some feedback on this issue, I'm adding extra abilities: placing 
icons into panels, and to specify them in terms of widths, and relative 
widths, rather than right-most edges.

Currently you can chnage the number of panels at will, just by issuing a 
new setSubField() call. If you wish to revert to a simple statusbar 
again, use this call:

    junk = sendMessage(Sb, SB_SIMPLE, 0, 0)

---------
cheers,
Derek.

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu