CJPushButton CARGO CANCEL

This forum is for support of XCodeJock
Post Reply
Message
Author
skiman
Posts: 1198
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

CJPushButton CARGO CANCEL

#1 Post by skiman »

Hi,

With the DCPushButtons there is a CARGO 'CANCEL' which is really usefull to use with standard CANCEL-buttons.

This isn't working with CJPushButtons.
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4802
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: CJPushButton CARGO CANCEL

#2 Post by rdonnay »

In _DCGETBX.PRG make the following code change:

Code: Select all

lCancelled := nEvent == xbeP_SetInputFocus .AND. Valtype(oNextXbp) = 'O' .AND. ;
      (oNextXbp:isDerivedFrom('DC_XbpPushButton') .OR. ;
       oNextXbp:isDerivedFrom('DC_XbpRadioButton') .OR. ;
       oNextXbp:isDerivedFrom('DC_XbpPushButtonXP') .OR. ;
       oNextXbp:isDerivedFrom('DC_XbpCheckBox') .OR. ;
       oNextXbp:isDerivedFrom('CJ_PushButton') .OR. ;  <<<<<<<<<<<<<<<<<<<<<<<<<<< new
       oNextXbp:isDerivedFrom('XbpMenu')) .AND. ;
      ((Valtype(oNextXbp:cargo) = 'C' .AND. oNextXbp:cargo == 'CANCEL') .OR. ;
       (Valtype(DC_GetCargo(oNextXbp)) = 'C' .AND. Upper(DC_GetCargo(oNextXbp)) == 'CANCEL'))
The eXpress train is coming - and it has more cars.

Post Reply