button caption bug

Post Reply
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

button caption bug

Post by Richard Chidiak »

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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: button caption bug

Post by Enrico Maria Giordano »

This is a working sample:

Code: Select all

#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
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: button caption bug

Post by Richard Chidiak »

EnricoMaria wrote:This is a working sample:

Code: Select all

#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
Post Reply