i need to test if status bar is defined.
Do anybody know how to do it?
How to test if StatusBar is defined in current window?
Moderator: Rathinagiri
Re: How to test if StatusBar is defined in current window?
Hi,mol wrote:i need to test if status bar is defined.
Do anybody know how to do it?
Please be so kind to try the following working sample:
Code: Select all
#include "minigui.ch"
Function Main
SET DATE GERMAN
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 640 ;
HEIGHT 400 ;
TITLE 'Statusbar Keyboard Demo' ;
MAIN
DEFINE STATUSBAR FONT 'Arial' SIZE 9
STATUSITEM "Statusbar Demo"
KEYBOARD
DATE
CLOCK
END STATUSBAR
END WINDOW
msginfo( Iif(IsControldefined( Statusbar, Form_1 ), "TRUE", "FALSE") )
CENTER WINDOW Form_1
ACTIVATE WINDOW Form_1
Return
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: How to test if StatusBar is defined in current window?
I've tried to go this way earlier, but I always got information that statusbar is not defined.
So, Grigori, your sample doesn't work
So, Grigori, your sample doesn't work
Re: How to test if StatusBar is defined in current window?
Hi Marek,mol wrote:I've tried to go this way earlier, but I always got information that statusbar is not defined.
So, Grigori, your sample doesn't work
Sorry but try an aboved sample
It works fine with HMG 3.0 Test VI:
- modified sample demo3.prg at your folder hmg\samples\statusbar;
- compiled by command build.bat demo3
- look for message "TRUE"
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: How to test if StatusBar is defined in current window?
I must excuse you!
It works!
I've tried
but a trick relys on cWindowName - it was variable containing name of window
I've changed in my program for:
and it starts to work!
Many thanks, Grigori
It works!
I've tried
Code: Select all
IsControlDefined (cWindowName, "StatusBar")
I've changed in my program for:
Code: Select all
IsControlDefined (&cWindowName, StatusBar)
Many thanks, Grigori