I making an application for a restaurant and Icreate a plan with many button to simulate the tables
on each button I link a menupopup where the use can select many functions .
On these function I must refresh caption and tooltip of all buttons
the captions are refresh but not the tooltip
on my application I made :
- Code: Select all Expand view
cCaption := cf( (oDTavoli)->data_pre)+CRLF+;
Str2Lines( alltrim((oDTavoli)->prenotazio), " " )+CRLF+ ;
"n."+str( (oDTavoli)->posti)+CRLF+;
transform(left( alltrim((oDTavoli)->Orario),5),"99:99")
cCaption_est := "Tavolo n."+ alltrim(str( (oDTavoli)->numreg))+CRLF+;
"prenotato per il giorno "+cf( (oDTavoli)->data_pre)+CRLF+;
"dal sig/ra "+Str2Lines( alltrim((oDTavoli)->prenotazio), " " )+CRLF+ ;
"per posti n."+str( (oDTavoli)->posti)+CRLF+;
"per le ore "+ transform(left( alltrim((oDTavoli)->Orario),5),"99:99")+" circa."
@Fila, (Col+nPassLarg) SBUTTON aBtn[Sil] OF oApp():oDlg FONT oFontTavoli ;
SIZE 50, 40 PIXELS ;
PROMPT cCaption ;
BORDER ;
TOOLTIP ( cCaption_est) ;
MESSAGE ( (oDTavoli)->nome) ;
COLORS CLR_BLACK, CLR_HBLUE ;
TEXT ON_CENTER OFFICE UPDATE
I made this function to refresh all buttons ( they are 300) :
stat func rinfresca( oDlg,oBtn)
Local nI
FOR nI=4 TO Len(oDlg:aControls)
oDlg:aControls[nI]:Refresh()
oBtn[nI]:Refresh(.t. ) ---> it give me error ..why?
NEXT nI
oDlg:Refresh()
RETURN (NIL)
any Idea ?