Silvio wrote: ...the customer let me see an old prg made in vb6 he moved the record taking with the mouse and press on recordselector and move it into another position
FranciscoA wrote:Silvio wrote: ...the customer let me see an old prg made in vb6 he moved the record taking with the mouse and press on recordselector and move it into another position
José Luis.
La pregunta es: ¿Cómo hacerlo con Drag and Drop?
The question is: How to do it using Drag and Drop?
#include "fivewin.ch"
function main()
local oDlg, oBrw, oFont, oCur, aData[ 12 ]
AEval( aData, { |u,i| aData[ i ] := NtoCMonth( i ) } )
DEFINE CURSOR oCur DRAG
DEFINE FONT oFont NAME "VERDANA" SIZE 0,-16
DEFINE DIALOG oDlg SIZE 250,500 PIXEL FONT oFont
@ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE aData COLUMNS 1 CELL LINES NOBORDER
WITH OBJECT oBrw
:nStretchCol := 1
:oDragCursor := oCur
:bDragBegin := { |r,c,f,o| SetDropInfo( { oBrw:nArrayAt, oBrw:aRow } ) }
:bDropOver := { |u,r,c,f| oBrw:LButtonDown( r,c ), ;
oBrw:LButtonUp(), ;
aDel( aData, u[ 1 ] ), ;
AIns( aData, oBrw:nArrayAt, u[ 2 ] ), ;
oBrw:Refresh() }
//
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RELEASE CURSOR oCur
return nil
FranciscoA wrote:Thanks, Rao.
I tried it and it works well for me.
Tomorrow I will do more tests on medium and large arrays.
Best regards.
elvira wrote:Mr. Nages,
Can we please have this sample with a DBF?.
Thank you.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 13 guests