refresh msgitem

refresh msgitem

Postby Silvio » Mon Aug 18, 2008 2:51 pm

I have a Main Window where i insert this comand to create a msgiten on msgbar:

DEFINE MSGITEM ::oMsgItem2;
OF ::oWndMain:oMsgBar ;
BITMAP "D_CAL" ;
TOOLTIP " " + i18n("Data di lavoro.") + " ";
ACTION Set_Date()


On a procedure I open a dialog and I want modify the ::omsgitem2 and i made :

oApp:oMsgItem2:cMsg:="Liberi"+ str(nLiberi)
oApp:oMsgItem2:nClrText:= CLR_BLACK
oApp:oMsgItem2:nClrPane:= CLR_HGREEN
oApp:oMsgItem2:refresh()



it run ok but when i return back on Main window and close the dialog It not refresh the old msgitem on the msgbar

How I can make to refresh the old msgitem ?


If I create another omsgitem8 and when I close the dialog
Could destroy this element ?


on the msgitem class not are end() or destroy methods
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: refresh msgitem

Postby JC » Mon Aug 18, 2008 4:27 pm

Silvio wrote:I have a Main Window where i insert this comand to create a msgiten on msgbar:

DEFINE MSGITEM ::oMsgItem2;
OF ::oWndMain:oMsgBar ;
BITMAP "D_CAL" ;
TOOLTIP " " + i18n("Data di lavoro.") + " ";
ACTION Set_Date()


On a procedure I open a dialog and I want modify the ::omsgitem2 and i made :

oApp:oMsgItem2:cMsg:="Liberi"+ str(nLiberi)
oApp:oMsgItem2:nClrText:= CLR_BLACK
oApp:oMsgItem2:nClrPane:= CLR_HGREEN
oApp:oMsgItem2:refresh()



it run ok but when i return back on Main window and close the dialog It not refresh the old msgitem on the msgbar

How I can make to refresh the old msgitem ?


If I create another omsgitem8 and when I close the dialog
Could destroy this element ?


on the msgitem class not are end() or destroy methods


Silvio, I have this same problem and this is my solution:

Code: Select all  Expand view  RUN
oMsgBar:delItem( oMsgBar:aItem[nPos] )
cUser := "newbe"
oUser := TMsgItem():new( oMsgBar, cUser, oMsgBar:getWidth( cUser ) + 15, TFont():new( "Tahoma", 0, 13 ), rgb( 72, 94, 59 ) )

oMsgBar:insItem( oUser, nPos )
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken and 94 guests