xBrowse drag&drop

xBrowse drag&drop

Postby Otto » Sat Feb 28, 2009 10:48 pm

Compiled with an older xBrowse version you could click anywhere in the browser to drag and drop.
Compiled with 9.01 you have to click in the row selector column.
How can I get the old behavior.
Thanks in advance.

Regards, Otto


Code: Select all  Expand view
//  nageswaragunupudi

#include 'fivewin.ch'

static lThouSep        := .f.
static cNumFormat      := "A"
static nxlLangID, cxlTrue := "=(1=1)", cxlFalse := "=(1=0)", cxlSum, cxlSubTotal, lxlEnglish := .f.

FUNCTION Main()
    LOCAL oWnd, oBrw, oCur, i, aData := {}

    FOR i := 1 TO 6
        AAdd( aData, { str(i,2), "Description " + Str( i ), Replicate( Chr( 64 + i ), 5 ) } )
    NEXT i

    DEFINE CURSOR oCur DRAG
    DEFINE WINDOW oWnd
    oBrw      := TXBrowse():New( oWnd )
    oBrw:SetArray( aData )
    oBrw:CreateFromCode()
    oWnd:oClient := oBrw
    //
    oBrw:oDragCursor   := oCur
    oBrw:bDragBegin    := { |nRow,nCol,nFlags| DragBegin( nRow, nCol, nFlags, oBrw ) }
    oBrw:bDropOver     := { |uDropInfo, nRow, nCol, nFlags| DropOver( uDropInfo, nRow, nCol, nFlags, oBrw ) }
    //
    ACTIVATE WINDOW oWnd
    oCur:End()

RETURN NIL

STATIC FUNCTION DragBegin( nRow, nCol, nFlags, oBrw )
//msginfo("DragBegin")
    SetDropInfo( EVAL( oBrw:SelectedCol():bStrData ) )

RETURN NIL

STATIC FUNCTION DropOver( uDropInfo, nRow, nCol, nFlags, oBrw )
//msginfo("DropOver")
    oBrw:lButtonDown( nRow, nCol, nFlags)
    oBrw:lButtonUp(   nRow, nCol, nFlags)

    MsgInfo( uDropInfo + CRLF + 'dropped on' + CRLF + ;
        EVAL( oBrw:SelectedCol():bStrData ) )

RETURN NIL
 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 81 guests