FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour PROMT on button
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
PROMT on button
Posted: Fri May 23, 2008 07:55 PM

Antonio

How can I dynamically update the PROMPT ( text ) on the button .. this code changes the color .. based on a static function that tests for an eof on a recorset .. is there a setprompt() method ??

Rick Lipkin

// seperate function

IF EMPTY(oBtn5)
ELSE

DO CASE
CASE lISCHARTER = .T. // found a charter document
cCHPROMPT := "This Projects CHARTER [read me]"+space(10)
OTHERWISE
cCHPROMPT := "This Projects CHARTER [not found]"+space(8)
ENDCASE

DO CASE
CASE lISCHARTER = .T. // found a charter document
oBtn5:SetColor( "G/W" )
oBTN5:ReFresh()
SysReFresh()
OTHERWISE
oBtn5:SetColor( "R+/W
" )
oBtn5:ReFresh()
SysReFresh()
ENDCASE
ENDIF

SysReFresh()

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
PROMT on button
Posted: Fri May 23, 2008 08:40 PM
Try

oBtn:cCaption = "New caption"


EMG
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
PROMT on button
Posted: Fri May 23, 2008 10:46 PM

Enrico

Thanks .. oBtn:cCaption worked perfectically !!

Rick Lipkin

Continue the discussion