Change the value of TMsgBar() at run-time

Change the value of TMsgBar() at run-time

Postby Rick Lipkin » Wed May 13, 2015 5: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
User avatar
Rick Lipkin
 
Posts: 2631
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Change the value of TMsgBar() at run-time

Postby Antonio Linares » Wed May 13, 2015 7:07 pm

Rick,

oMsgBar:cMsgDef = "New text"
oMsgBar:Refresh()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41351
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Change the value of TMsgBar() at run-time

Postby Rick Lipkin » Wed May 13, 2015 8:04 pm

Antonio

Thank you .. I had to prefix the Mdi Window object to get it to work.
Code: Select all  Expand view

oWindMain:oMsgBar:cMsgDef := xMessage,oWindMain:oMsgBar:ReFresh(),;
 

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2631
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Change the value of TMsgBar() at run-time

Postby James Bott » Mon May 18, 2015 1: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Change the value of TMsgBar() at run-time

Postby russimicro » Tue May 19, 2015 2: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
russimicro
 
Posts: 229
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 36 guests

cron