FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to perform a refresh of msgbar?
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
How to perform a refresh of msgbar?
Posted: Tue Mar 21, 2017 09:45 AM
Hi,
I have to change in oMsgBar the string from "STRING" to "SET" not only If I click in the string "CLICK" but even IF a Select the menu Set global password.
The string must change based on the value of public variable lPsw.
I do not know if I have to refresh()....

Please any hints?

Marco



Code (fw): Select all Collapse
#include "fivewin.ch"
FUNCTION MAIN

LOCAL oMain
LOCAL oItem
LOCAL oMenu

PUBLIC lPsw := .F.



MENU oMenu 2007

  MENUITEM "&File"

     MENU 2007
        MENUITEM "Set Global Password"       ACTION  GlobalPsw()
        MENUITEM "Global Password?"          ACTION  MsgInfo( M->lPsw )
        MENUITEM "Global Password False"     ACTION  ( M->lPsw := .F. , oItem:refresh() )

     ENDMENU

ENDMENU

DEFINE WINDOW oMain  MENU oMenu

SET MESSAGE OF oMain TO "MyMsgMar"  CENTERED DATE KEYBOARD 2007

oItem := TMsgItem():New( oMain:oMsgBar, "CLICK" , 50, , , , .T., { || oItem:SetText( GlobalPsw() ) } ,,, "" )

ACTIVATE WINDOW oMain


RETURN NIL


FUNCTION GLOBALPSW()
M->lPsw := .T.

RETURN  "SET"
Marco Boschi
info@marcoboschi.it
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to perform a refresh of msgbar?
Posted: Tue Mar 21, 2017 09:53 AM
Code (fw): Select all Collapse
#include "fivewin.ch"
FUNCTION MAIN

LOCAL oMain
LOCAL oItem
LOCAL oMenu

PUBLIC lPsw := .F.



MENU oMenu 2007

  MENUITEM "&File"

     MENU 2007
        MENUITEM "Set Global Password"       ACTION  oItem:SetText( GlobalPsw() )
        MENUITEM "Global Password?"          ACTION  MsgInfo( M->lPsw )
        MENUITEM "Global Password False"     ACTION  ( M->lPsw := .F. , oItem:SetText( "CLICK" ) )

     ENDMENU

ENDMENU

DEFINE WINDOW oMain  MENU oMenu

SET MESSAGE OF oMain TO "MyMsgMar"  CENTERED DATE KEYBOARD 2007

oItem := TMsgItem():New( oMain:oMsgBar, "CLICK" , 50, , , , .T., { || oItem:SetText( GlobalPsw() ) } ,,, "" )

ACTIVATE WINDOW oMain


RETURN NIL


FUNCTION GLOBALPSW()
M->lPsw := .T.

RETURN  "SET"


EMG
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: How to perform a refresh of msgbar?
Posted: Tue Mar 21, 2017 10:04 AM

Gracias!

:D

Marco Boschi
info@marcoboschi.it

Continue the discussion