Page 1 of 1

dcget mouse only

Posted: Wed Dec 05, 2012 11:09 am
by bwolfsohn
I have a dcget checkbox in the middle of a getlist. How do i restrict access to this get to the mouse only.. i.e. enter, tab, up and down arrows should skip this get...

TIA
Brian

Re: dcget mouse only

Posted: Wed Dec 05, 2012 11:27 am
by rdonnay
I'll see if I can find a workaround for you and write a sample.

Re: dcget mouse only

Posted: Wed Dec 05, 2012 5:04 pm
by rdonnay
The best way to handle this is to add a new feature to eXpress++.
All eXpress++ GUI classes inherit from DC_XbaseParts(). This class now includes a new iVar: isNoEditNavKey

Assigning a .T. to this iVar will give you the behavior you want.
Changes were required to _DCGETBX.PRG and _DCCLASS.PRG (attached)

Code: Select all

#INCLUDE "dcdialog.CH"
#INCLUDE "appevent.CH"

FUNCTION Main()

LOCAL GetList[0], cGet, lGet, GetOptions

cGet := Space(10)
lGet := .f.

@ 0,0 DCGET cGet

@ 1,0 DCGET cGet

@ 2,0 DCGET lGet EVAL {|o|o:isNoEditNavKey := .t.}

@ 3,0 DCGET cGet

@ 4,0 DCGET cGet

DCGETOPTIONS CHECKGET

DCREAD GUI FIT TITLE 'Navigation Test' OPTIONS GetOptions ;

RETURN nil

* ---------

PROC appsys ; return