Page 2 of 2

Re: DCBROWSE RBSELECT

Posted: Tue Sep 01, 2015 2:14 am
by skiman
Tom,

In understand why you are doing this stuff.

I was just wondering if the RETURN DCGUI_IGNORE in the handler isn't the cause of the different behaviour.
Your new code works but skip back one line when RB-Down in Browse!
Roger had this:

Code: Select all

IF Valtype(oXbp) = 'O' .and. oXbp:isDerivedFrom('XbpCellGroup') .AND. nEvent == xbeM_RbDown
  nCell := oXbp:cellFromPos(mp1)
  oBrowse:itemRbDown( mp1, { oXbp:parent, nCell } )
  oBrowse:forceStable()
RETURN DCGUI_IGNORE     <<------------ this isn't in your code.
ENDIF

Re: DCBROWSE RBSELECT

Posted: Tue Sep 01, 2015 2:14 am
by Tom
Mmh. It works correct if the code returns DCGUI_IGNORE in the section. But in that situation, the RbDown event is gone. Without DCGUI_IGNORE, the code works correct so far, but the itemRbDown clause fires twice, and sets the pointer one line above sometimes.

Re: DCBROWSE RBSELECT

Posted: Tue Sep 01, 2015 2:16 am
by Tom
Hi, Chris.

As I wrote before - you're right. Roger's code fixes RBSELECT, but it kills the RbDown event (DCGUI_IGNORE). I want to show a context menu or do some kind of special drag&drop with the right mouse button. I need both.

Re: DCBROWSE RBSELECT

Posted: Tue Sep 01, 2015 2:26 am
by skiman
Tom,

I'm using this in my code:
RBSELECT ;
RBDOWN {|| DC_CompleteEvents(), ... } ;
I never had any complaint. It's just to insert lines, I'm not using it for doing something on cells.

I see that this RBDOWN clause isn't in the documentation?

Re: DCBROWSE RBSELECT

Posted: Tue Sep 01, 2015 2:28 am
by Tom
Hi, Chris.

I can't use the RBDOWN clause this way, because the code in my custom handler is much too complex for this.

Re: DCBROWSE RBSELECT

Posted: Tue Sep 01, 2015 3:20 am
by Tom
Got it. If the event is xbeM_RbDown, the return code for the handler is set to DCGUI_IGNORE anyway and to DCGUI_NONE in all other situations.

Re: DCBROWSE RBSELECT

Posted: Tue Sep 01, 2015 5:29 am
by rdonnay
The RETURN DCGUI_IGNORE prevents that problem.