FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour refresh msgitem
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
refresh msgitem
Posted: Mon Aug 18, 2008 02: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
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Re: refresh msgitem
Posted: Mon Aug 18, 2008 04:27 PM
Silvio wrote:I have a Main Window where i insert this comand to create a msgiten on msgbar:

DEFINE MSGITEM ::oMsgItem2;
OF ::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:="Liberi"+ str(nLiberi)
oApp:oMsgItem2:= CLR_BLACK
oApp:oMsgItem2:= 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:

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

Continue the discussion