PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD19] How to display a message in the main menu?
[WD19] How to display a message in the main menu?
Iniciado por guest, 03,feb. 2016 11:49 - 2 respuestas
Publicado el 03,febrero 2016 - 11:49
Hi all

I need to display a message in the main menu's status bar. This message may be created either in the main menu itself or in some of the windows than are opened from the main menu. I can't find the correct syntax for the displaying.

Message("StatusInfo",sWarningText)
or
Message("MAINMENU.StatusInfo",sWarningText)

both work OK, if done in the mainmenu, but if done in any child window, with the MAINMENU still visible in the background, both launch an error 1059 'StatusInfo' - unknown element.

So how should I refer to the StatusInfo messagefield from the child windows?

best regards
Ola
Publicado el 03,febrero 2016 - 13:17
Hi Ola,

the easiest way is to create a local procedure in your main window (DisplayMessage) doing the actual displaying, and to call it from anywhere you want

Best regards
Publicado el 03,febrero 2016 - 13:32
Hi Fabrice

I was already experimenting with just an added static field in the lower part of the mainmenu, as it could have easily been referred to from anywhere, but your suggestion is better. I just did it, and it works OK. Thank you.

Best regards
Ola