FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour change button name on the fly
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
change button name on the fly
Posted: Tue Jan 20, 2009 03:18 AM
I seem to be having a problem changing the name of a button after I click on it. Here is the code. What am I doing wrong.

redefine button obtn7 prompt cPrompt id 16 of oDlg ;
   action(openfilter := .f., asetfilter(.f.,obrw),gl->(dbgoto(1)),oBrw:setfocus(),oBrw:refresh(),oBrw:setfocus(),cPrompt := "help",oBtn7:refresh(),oDlg:update(),.t.) UPDATE
Thank you

Harvey
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: change button name on the fly
Posted: Tue Jan 20, 2009 03:40 AM

hello Hag

try with
oBtn7:SetText( "Help" )
oBtn7:refresh()

Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: change button name on the fly
Posted: Tue Jan 20, 2009 04:03 AM

Perfect. Thanks.

Thank you

Harvey
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: change button name on the fly
Posted: Tue Jan 20, 2009 10:17 AM

For your information, you don't need to refresh the button.

EMG

Continue the discussion