Page 1 of 1
StatusBar Control
Posted: Sat Sep 25, 2010 11:25 am
by cocoking
How do I close a statusbar control?
Is it possible to change an existing caption of a status item?
TYVM
Re: StatusBar Control
Posted: Wed Sep 29, 2010 9:39 am
by l3whmg
Hi Cocoking,
my answer is Yes and I'm refer to HMG 3.
For example:
You have defined some StatusItems like these:
Code: Select all
DEFINE STATUSBAR
STATUSITEM "Database name: " + cDbName WIDTH 250
STATUSITEM "User Name : " + cUserName WIDTH 250
END STATUSBAR
where cDbName and cUserName are vars (Public, Local, etc.): in this way, you can add variable data (for example)
You can modify one (or more) STATUSITEM caption with:
Code: Select all
FormName.StatusBar.Item(1) := "DataBase name: " + cDbName
FormName.StatusBar.Item(2) := "User name: " + cUserName
Pay attention to the ordinal number!
Best regards
Re: StatusBar Control
Posted: Fri Oct 01, 2010 9:08 am
by cocoking
Thank you, l3whmg.
Due to pressing issues at work, I can only try your suggestion over the weekend.
Followup, please:
1. From your example, is it correct to say that status bar items are implemented as arrays?
2. How do I close the status bar?
Thanks again.
Re: StatusBar Control
Posted: Mon Oct 04, 2010 9:10 am
by l3whmg
Hi Cocoking
1. From your example, is it correct to say that status bar items are implemented as arrays?
I don't understand the purpose of your question

Any way: since there is a unique name to each item, I believe that developers have used an array and for this reason we must refer to each item with a number. I don't read about this form
"FormName.StatusBar.ItemName.Caption"
2. How do I close the status bar?
I think you can't close a status bar: there isn't this method on the manual. On the other hand, why close a status bar?
Best regards
Re: StatusBar Control
Posted: Mon Oct 04, 2010 11:09 am
by cocoking
I have thought of closing the status bar (and reopening it) because I can't find a way to to change the status items. But now that you taught me how to "manipulate" the status bar, I may no longer need to close.
Thank you for your help.