Page 1 of 1

DCBROWSECOL DRAG ... DRAGDIALOG

Posted: Wed Sep 16, 2015 7:10 am
by Tom
Hi, Roger.

If DCBROWSECOL is used with DRAG/DRAGDIALOG, dragging starts anyway, even if the mouse points to the heading area. Besides this conflicts with column resizing, it seems not to be very useful to drag heading/footing data, but only those from the dataarea. Since the column object is handed to the DRAG/DRAGDIALOG codeblocks, it's hard to find out whether the mouse was clicked in the dataarea or somewhere else in the column.

I changed this in line 4322 of _DCGETBX.PRG (build 260):

Was:

Code: Select all

IF IsMemberVar(oDrop,'DRAGBLOCK') .AND. ValType(oDro:dragBlock) == 'B'
Is:

Code: Select all

IF IsMemberVar(oDrop,'DRAGBLOCK') .AND. ValType(oDro:dragBlock) == 'B' ;
   .AND. !(oXbp:IsDerivedFrom('XbpCellGroup') .AND. (oXbp == oXbp:Parent:Heading .or. oXbp == oXbp:Parent:Footing))
This fits to my need and works well - dragging is started from the dataarea only. Maybe, an option would be nice (DRAGAREA).

Besides, in DCDIALOG.CH I found an option "TYPE" between the DRAG and the DRAGDIALOG clause. What is this used for?

Re: DCBROWSECOL DRAG ... DRAGDIALOG

Posted: Wed Sep 16, 2015 10:40 am
by rdonnay
That is the correct solution. Thank you.

I will add it to the next build.

Re: DCBROWSECOL DRAG ... DRAGDIALOG

Posted: Thu Sep 17, 2015 12:45 am
by Tom
And what is TYPE used/reserved for?

Re: DCBROWSECOL DRAG ... DRAGDIALOG

Posted: Thu Sep 17, 2015 8:16 am
by rdonnay
And what is TYPE used/reserved for?
Hmmm. I don't remember. I need to look at the docs and the code.