Page 1 of 1

Status Bar

Posted: Fri May 08, 2009 12:07 pm
by Vanguarda
Hello HMG Users,

I have a form main with a StatusBar. when i try this command:
Main.StatusBar.Item(1) := " Text of status bar" :D

in my module main.prg, work fine. But when i try in other module it don´t work. :shock:

My form main is called in main.prg module.

When i try in another module, i get a message of error in line of command (Main.StatusBar.Item(1)) erro like "."

what´s going on?
Anybody help me?

PS: Sorry my bad english :lol:

Tank´s a lot, for your attention.

Re: Status Bar

Posted: Fri May 08, 2009 12:16 pm
by mol
Did you try to declare window MAIN in other module:
DECLARE WINDOW MAIN
before line that changes status line?

Marek

Re: Status Bar

Posted: Fri May 08, 2009 2:27 pm
by Vanguarda
Hello Marek,

i don´t understand your question :?:


Regards,

Re: Status Bar

Posted: Fri May 08, 2009 2:53 pm
by Rathinagiri
To refer a window in a different prg file, we have to use "declare window windowname" command before referring it. That is what Marek says.

Re: Status Bar

Posted: Fri May 08, 2009 2:58 pm
by esgici
Hi Paulo


In addition to DEFINE WINDOW, we have a DECLARE WINDOW statement:

According to HMG Documentation:
DECLARE WINDOW : Declares a window name..

Syntax : DECLARE WINDOW <WindowName>

A window must be declared using this command, if you need to refer to it prior
its definition in code, or when you refer to it in a different .prg file from
the one it was defined using semi-oop syntax.

Saludos

--

Esgici

Re: Status Bar

Posted: Fri May 08, 2009 4:38 pm
by Vanguarda
i don´t try it. I´ll try today, in my house.

Thank very much Marek, rathinagiri, esgici.

you are amazing.



regards,

Re: Status Bar

Posted: Thu May 14, 2009 1:30 pm
by CCH4CLIPPER
Hi Marek, Rathinagiri & Esgici

Tx for providing an answer to one of my unasked questions :D

CCH
http://cch4clipper.blogspot.com