button caption bug

button caption bug

Postby Richard Chidiak » Tue Mar 14, 2006 9: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: button caption bug

Postby Enrico Maria Giordano » Tue Mar 14, 2006 10:04 pm

This is a working sample:

Code: Select all  Expand view
#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
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: button caption bug

Postby Richard Chidiak » Wed Mar 15, 2006 12:02 pm

EnricoMaria wrote:This is a working sample:

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 81 guests