PROMT on button

Postby Rick Lipkin » Fri May 23, 2008 7: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()
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Postby Enrico Maria Giordano » Fri May 23, 2008 8:40 pm

Try

Code: Select all  Expand view  RUN
oBtn:cCaption = "New caption"


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Rick Lipkin » Fri May 23, 2008 10:46 pm

Enrico

Thanks .. oBtn:cCaption worked perfectically !!

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 64 guests