StatusBar Control

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
cocoking
Posts: 46
Joined: Tue Jun 15, 2010 1:15 pm
Location: Malabang, Lanao del Sur

StatusBar Control

Post by cocoking »

How do I close a statusbar control?
Is it possible to change an existing caption of a status item?

TYVM
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: StatusBar Control

Post 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
Luigi from Italy
www.L3W.it
cocoking
Posts: 46
Joined: Tue Jun 15, 2010 1:15 pm
Location: Malabang, Lanao del Sur

Re: StatusBar Control

Post 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.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: StatusBar Control

Post 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 :oops: 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
Luigi from Italy
www.L3W.it
cocoking
Posts: 46
Joined: Tue Jun 15, 2010 1:15 pm
Location: Malabang, Lanao del Sur

Re: StatusBar Control

Post 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.
Post Reply