Status bar control 
Author Message
 Status bar control

I am relatively new to this control.  Have tried reading the docs to
figure it out but just dont seem to get it.  Any help would be
appreciated.  


Wed, 30 Jan 2002 03:00:00 GMT  
 Status bar control

A StatusBar control has a collection of Panel objects. Each Panel can show a separate piece of text, an icon or some other piece of information. When you create a new StatusBar control it has one Panel in it. Right click on the StatusBar and choose Properties from the pop-up menu to explore what else you can put in a Panel apart from text.

Regards,
Simon Jones
MillStream Designs Ltd
Independent IT Consultants


  I am relatively new to this control.  Have tried reading the docs to
  figure it out but just dont seem to get it.  Any help would be
  appreciated.



Wed, 30 Jan 2002 03:00:00 GMT  
 Status bar control
Going further, of particular interest:

1.  If you set the style to 'Simple', you have only one panel and
populate it with the 'SimpleText' property - very quick and neat!

2.  If you make the style 'normal' and work with the Panels collection,
it is handy to treat one of the panels (often a 'middle' one) as your
default or catch-all panel - in form_resize, make its width the
difference between the control width and the sum of the widths of the
other panels so your right-side panels are always aligned on the right.

3.  Often it is discovered far down the road that an additional panel
would be nice but because we have hardcoded panel(1), panel(2) so many
times it is a bother to put it in; best is to use the 'key' feature from
the get-go, even if you see no possibility of 'enhancement'.

4.  Each panel has a style, among those available being date and time.
I recently encountered an app where the fellow used a timer and a block
of code to maintain a clock on the status bar because he didn't realize
that functionality was built-in.

5.  Proceeding from 4:  read up thoroughly on the control - invest now
and reap the benefits for eternity!



Wed, 30 Jan 2002 03:00:00 GMT  
 Status bar control

Jeff's point 2 is taken care of by the AutoSize property of the Panel object. This can be set to sbrNoAutoSize, sbrSpring or sbrContents. The first setting is obvious. The third sizes the panel to the text/image it contains. The sbrSpring option makes this Panel take up any available space on the StatusBar that is not taken by another Panel. There is a MinWidth property for each Panel which affects those with AutoSize set to sbrSpring or sbrContents. You do not have to write code in the Form_Resize event to resize Status Bar Panels.

Regards,
Simon Jones
MillStream Designs Ltd
Independent IT Consultants


  Going further, of particular interest:

  1.  If you set the style to 'Simple', you have only one panel and
  populate it with the 'SimpleText' property - very quick and neat!

  2.  If you make the style 'normal' and work with the Panels collection,
  it is handy to treat one of the panels (often a 'middle' one) as your
  default or catch-all panel - in form_resize, make its width the
  difference between the control width and the sum of the widths of the
  other panels so your right-side panels are always aligned on the right.

  3.  Often it is discovered far down the road that an additional panel
  would be nice but because we have hardcoded panel(1), panel(2) so many
  times it is a bother to put it in; best is to use the 'key' feature from
  the get-go, even if you see no possibility of 'enhancement'.

  4.  Each panel has a style, among those available being date and time.
  I recently encountered an app where the fellow used a timer and a block
  of code to maintain a clock on the status bar because he didn't realize
  that functionality was built-in.

  5.  Proceeding from 4:  read up thoroughly on the control - invest now
  and reap the benefits for eternity!



Wed, 30 Jan 2002 03:00:00 GMT  
 Status bar control
Hi Paul

I asked a question recently on this NG, which also directed me to using the
StatusBar control for the first time.

The thing which had me stuck for a while, was that I couldn't work out how
to actually get the bar onto the form. My toolbar didn't have a StatusBar on
it, and all the documentation didn't explain where to find it (does mention
a file name, but that's it).

Eventually I found that you have to right click on the toolbar, choose
Controls, and tick "Microsoft Windows Common Controls 6.0"

To add the properties, styles etc mentioned in the previous messages, drag
the bar onto the form, right click on it, and choose properties. Using F4
like all the other objects on the form won't alow you to edit the properties
you need to.

HTH

Philip.

Quote:

> Going further, of particular interest:

> 1.  If you set the style to 'Simple', you have only one panel and
> populate it with the 'SimpleText' property - very quick and neat!

> 2.  If you make the style 'normal' and work with the Panels collection,
> it is handy to treat one of the panels (often a 'middle' one) as your
> default or catch-all panel - in form_resize, make its width the
> difference between the control width and the sum of the widths of the
> other panels so your right-side panels are always aligned on the right.

> 3.  Often it is discovered far down the road that an additional panel
> would be nice but because we have hardcoded panel(1), panel(2) so many
> times it is a bother to put it in; best is to use the 'key' feature from
> the get-go, even if you see no possibility of 'enhancement'.

> 4.  Each panel has a style, among those available being date and time.
> I recently encountered an app where the fellow used a timer and a block
> of code to maintain a clock on the status bar because he didn't realize
> that functionality was built-in.

> 5.  Proceeding from 4:  read up thoroughly on the control - invest now
> and reap the benefits for eternity!

--

____________________________________________________

Philip Johns
03 5561 5383 (w)
   5561 3586 (h)
   5561 5384 (fax)



____________________________________________________



Thu, 31 Jan 2002 03:00:00 GMT  
 Status bar control
Terrific!  That's one less problem to deal with . . .


Thu, 31 Jan 2002 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Getting hWnd of Panel in Status Bar control

2. Status Bar Control Problems

3. Status Bar control (VB 5 Enterprise)

4. Problems with Status Bar Control

5. Problems with Status Bar Control

6. How to place bitmap on Status Bar control?

7. HELP - VB4 Toolbar & Status bar control

8. Need help with Status bar control

9. Display Long Date in Status Bar control - No Go

10. VB4 Status Bar - controlling display?

11. Called What'sThis help from Status Bar Control

12. maskedit and status bar control

 

 
Powered by phpBB® Forum Software