FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change the value of TMsgBar() at run-time
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Change the value of TMsgBar() at run-time
Posted: Wed May 13, 2015 05:20 PM

To All

I would like to be able to change the value of 'set message' (TMsgBar()) at runtime. The only way I have found to do that is to re-issue the TMsgBar():New .. which works .. but the message bar 'blinks' when I do this.

Any way to just change the value of TMsgBar() without using the :New method?

Thanks
Rick Lipkin

ps .. :SetMsg() only sends a temporary text to the MsgBar

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Change the value of TMsgBar() at run-time
Posted: Wed May 13, 2015 07:07 PM

Rick,

oMsgBar:cMsgDef = "New text"
oMsgBar:Refresh()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Change the value of TMsgBar() at run-time
Posted: Wed May 13, 2015 08:04 PM
Antonio

Thank you .. I had to prefix the Mdi Window object to get it to work.
Code (fw): Select all Collapse
oWindMain:oMsgBar:cMsgDef := xMessage,oWindMain:oMsgBar:ReFresh(),;

Rick Lipkin
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Change the value of TMsgBar() at run-time
Posted: Mon May 18, 2015 01:35 PM

Rick,

Just FYI, you can always use the wndMain() function which returns the main window object. So you can do:

wndMain():oMsgbar...

This prevents you from having to pass the main window object to functions or class methods.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 410
Joined: Sun Jan 31, 2010 03:30 PM
Re: Change the value of TMsgBar() at run-time
Posted: Tue May 19, 2015 02:11 PM

Good day ...

I used this method to change the text, but when mouse over the bar, showing me the previous value

regards

Johnson Russi

Continue the discussion