Page 1 of 1

Keyboard tagging

Posted: Wed Feb 24, 2010 10:15 am
by sdenjupol148
Roger,

I have been using the TAGENABLE cluase of DCBROWSE and it works nicely.
I've written a Tag handler routine that allows the user to use keyboard tagging shortcuts.
Can you add this to the TAGENABLE feature of DCBROWSE.
I've included a snippet of the code below to give you an idea of what I mean.

Bobby

Code: Select all

*--------------------------------------
function TagArrayHandler( nEvent, mp1, mp2, oXbp, oDialog, Getlist, aRef )

IF nEvent == xbeP_Keyboard
  IF mp1 = xbeK_CTRL_DOWN
    aRef[2,aRef[1]:cargo[4],aRef[3]] := IIF(aRef[2,aRef[1]:cargo[4],aRef[3]] == "Y", " ", "Y" )
    aRef[1]:refreshCurrent()
    PostAppEvent( xbeP_Keyboard, xbeK_DOWN, nil, oXbp )
  ELSEIF mp1 = xbeK_CTRL_UP
    aRef[2,aRef[1]:cargo[4],aRef[3]] := IIF(aRef[2,aRef[1]:cargo[4],aRef[3]] == "Y", " ", "Y" )
    aRef[1]:refreshCurrent()
    PostAppEvent( xbeP_Keyboard, xbeK_UP, nil, oXbp )
  ELSEIF mp1 == xbeK_SPACE
    aRef[2,aRef[1]:cargo[4],aRef[3]] := IIF(aRef[2,aRef[1]:cargo[4],aRef[3]] == "Y", " ", "Y" )
    aRef[1]:refreshCurrent()
  ENDIF
ENDIF

RETURN DCGUI_NONE

Re: Keyboard tagging

Posted: Wed Feb 24, 2010 11:23 am
by rdonnay
Here's the change you requested.
That was a good idea.

Copy _DCXBROW.PRG to \exp19\source\dclipx and run build19_sl1.bat to rebuild dclipx.dll

Re: Keyboard tagging

Posted: Wed Feb 24, 2010 12:17 pm
by sdenjupol148
Roger,

Thanks!
Works great and fast.
I realize however that there is no way to tag all or untag all.
Instead of writing a lot of right click popup menu code, how about using CTRL_INS for tag all and CTRL_DEL for untag all?

Bobby

Re: Keyboard tagging

Posted: Wed Feb 24, 2010 12:40 pm
by rdonnay
Here it is.