FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour button caption bug
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
button caption bug
Posted: Tue Mar 14, 2006 09:26 PM

We can not change anymore the button caption "on the fly" as in the sample below. The caption does not change.
Using sbutton instead of button will display the correct caption while clicking.

Richard

FUNCTION MAIN()
LOCAL oDlg,OBTN
LOCAL LTEST := .T.

DEFINE DIALOG oDlg TITLE "Button test"
@ 01,01 BUTTON OBTN PROMPT "Activate" OF ODLG SIZE 50,12 ;
ACTION (if(LTEST,(LTEST := FALSE,obtn:ccaption := "Active" ),(LTEST := TRUE ,obtn:ccaption := "Inactive" )) , obtn:refresh(),ODLG:update())
ACTIVATE DIALOG oDlg CENTER

return nil

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: button caption bug
Posted: Tue Mar 14, 2006 10:04 PM
This is a working sample:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    DEFINE DIALOG oDlg

    @ 1, 1 BUTTON oBtn PROMPT "Change";
           ACTION oBtn:SetText( "Changed" )

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: button caption bug
Posted: Wed Mar 15, 2006 12:02 PM
EnricoMaria wrote:This is a working sample:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    DEFINE DIALOG oDlg

    @ 1, 1 BUTTON oBtn PROMPT "Change";
           ACTION oBtn:SetText( "Changed" )

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG


Enrico,

Thank you

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013

Continue the discussion