Page 1 of 1

DCGET problem Focus xbeK_PGDN

Posted: Thu May 21, 2015 5:00 am
by JManuelVar
Good Morning. Can someone please help me.

I get the following screen (3)

The DCGET this EDITPROTECT with Variable mEAdd y mEEdit

@ 13,10 DCGET nTbaMAR_cod PICT "99" SIZE 4 EDITPROTECT {||!mEAdd} GETOBJECT oGetCod ;
MESSAGE 'Codigo de la MARCAS/ALMACENES. Valor Comprendido ente 1 y 89 '
@ 14.2,10 DCGET nTbaMAR_Nom PICT "@!" SIZE 32 EDITPROTECT {||!mEEdit} GETOBJECT oGetNom

I pressed the Edit, Variable Change and DCGET mEEdit to edit. What makes DCGET Change the color that has the focus. I is set to

DCGETOPTIONS NOBUSY HILITEGETS COLOR_RED NOSUPERVISE ;
COLORGETS { { CIDA_GET_A0, CIDA_GET_A1} , { CIDA_GET_P0, CIDA_GET_P1 } };
SAYFONT ('10.Segoe Condensed') GETFONT ('11.Segoe Condensed') FONT ('10.Segoe Condensed');

When I Record, Pulse with the mouse the record button or Page Down Pulse, as defined in the button
AccelKey xbeK_PGDN

Well if the Botonen Pulse Record. everything OK

(2)

But if I hit, recorded correctly, but the DCGET, keeps the color when it has focus, the DCGET in Protected mode.

(1)

I can do.

Re: DCGET problem Focus xbeK_PGDN

Posted: Thu May 21, 2015 7:30 am
by Cliff Wiernik
A change made in Express++ several versions ago created this behavior. I had it also when I pressed the PgDn key to exit out of edit mode and popup of save confirmation dialog. The colorget did not get cleared.

I made the following change in my code to adjust for this:

Code: Select all

    
  DCADDBUTTON PARENT oToolBar CAPTION cSaveCaption ;                                // Save Key
      SIZE 7,1 ;
      TOOLTIP 'Press PgDn to Save'                      ;
      ACCELKEY {xbeK_PGDN}                              ;
      ACTION {|| iif(LB_CompleteEventsBeforeSave(),     ;
                  (DC_CompleteEvents(),eval(bSave)),    ;                                     //<< addition for DC_CompleteEvents
                  (eval(bSave))) }                      ;
The ACTION clause could be reduced to the following. The additional code just allowed for turning off the behavior based on the Express++ version:

Code: Select all

      ACTION {|| DC_CompleteEvents(),eval(bSave)}     ;

Code: Select all

  IF DC_VersionExpress(3) > '254'
    LB_CompleteEventsBeforeSave(.T.)                                                           //<< lb_completeevents is a get/set function (defaults to .F.) that is set to .T. for builds 255 and greater
  ENDIF