Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to code the activeX statusbar object 2

Status
Not open for further replies.

Nifrabar

Programmer
Joined
Mar 16, 2003
Messages
1,343
Location
NL
I should like to get some docu for setting number of panes, text, pictures a.s.o. of the Statusbar activeX by code. So I can use these in my app.
-Bart
 
Are you talking about on-lin help or examples?

The easiest way to get to the on-line help (sparse) is to drop the control on a form, then right-click and select SBarCtrl Properties. Then click help.
There isn't much help in there though, so you may have to look elsewhere.
However, in the properties window, you can change the number of panels, put a picture (.ico) in a panel, and so on.
But I'll throw in some examples.

To add panels at runtime:
Code:
   MyForm.oleStatusBar.Panels.Add(3)
Where 3 = the index position where you want the panel added.

Set the width of panel 1 to 100 pixels.
Code:
   MyForm.oleStatusBar.Panels(1).Width = 100

Get traffice light picture handles to place on one of the panels:
Code:
   PUBLIC oGreenLight
   PUBLIC oAmberLight
   PUBLIC oRedLight
   STORE LOADPICTURE('TRFFC10A.ICO') TO oGreenLight
   STORE LOADPICTURE('TRFFC10B.ICO') TO oAmberLight
   STORE LOADPICTURE('TRFFC10C.ICO') TO oRedLight

   THISFORM.oleStatusBar.panels(1).Picture = oGreenLight  &&... ready status
   THISFORM.oleStatusBar.panels(1).Picture = oAmberLight  &&... busy status
   THISFORM.oleStatusBar.panels(1).Picture = oRedLight  &&... wait status

Place text in one of the panels:
Code:
   THISFORM.oleStatusBar.panels(3).TEXT = 'Text Text'

Example for GUI interface
Code:
   THISFORM.oleStatusBar.panels(1).Picture = oRedLight  
   THISFORM.oleStatusBar.panels(3).TEXT = 'Waiting for response from server...'
   SELECT * FROM .....

   THISFORM.oleStatusBar.panels(1).Picture = oAmberLight  
   THISFORM.oleStatusBar.panels(3).TEXT = 'Processing data...'
   SCAN FOR .....
      *... do stuff
   ENDSCAN

   THISFORM.oleStatusBar.panels(1).Picture = oGreenLight  
   THISFORM.oleStatusBar.panels(3).TEXT = 'Processing completed.'


-Dave S.-
[cheers]
Even more Fox stuff at:
 
Both Chris and Dave,
Great, it helps a lot.

Chris , sorry I did nor see your faq before. Longtime ago I remember I stumbled with the statusbar activeX, that's why I asked you now. But as usually in this forum...
So many good help that you even can make a choise which solution to use.

Thanks again !!

-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top