Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drag'n drop
Message
De
27/09/2000 11:55:59
 
 
À
27/09/2000 11:47:01
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00421329
Message ID:
00421524
Vues:
15
Thanx Cetin, it'll surely help me to start with this new (for me) feature. BTW, i'm workin' with VFP6


>>Hello,
>>
>>I've wo forms with grid on them. I wish fill the grid1 of form1 with the records of the grid1 of form2 by drag'n drop.
>>
>>Does anybody have some tips (tricks) to do this.
>
>
For VFP6 there is GridHitTest() method to determine where you are. For earlier versions this DragOver code helped me :
>
LPARAMETERS oSource, nXCoord, nYCoord, nState
>WITH this
>  IF nState = 0
>    .setfocus()
>    SCATTER name loDraggerTarget
>    lcSrcRecSrc     =lower(oSource.parent.parent.recordsource)
>    lcTarRecSrc		=lower(this.recordsource)
>    IF lcSrcRecSrc = lcTarRecSrc
>      oSource.dragicon = oSource.NoDropIcon
>      RETURN
>    ENDIF
>    oSource.dragicon = iif(oSource.lMoveOperation,oSource.MoveIcon,oSource.CopyIcon)
>  ENDIF
>  *	IF nState = 1
>  IF !(between(nXCoord, .left+2, .left+.width-2) and between(nYCoord,.top+2,.top+.height-2))
>    oSource.dragicon = oSource.NoDropIcon
>  ENDIF
>  *	ENDIF
>  nNewRow = int((nYCoord - .headerheight - .top)/.rowheight)+1
>  IF .scrollbars < 2 ;
>      or nXCoord < .width - sysmetric(5)				&& Doesn't have vertical scrollbar or not on vertical bar area
>    DO case
>      CASE nYCoord < .top+.headerheight+.rowheight/3	&& Top thirds of top row
>        .doscroll(2)								&& Scroll page up
>      CASE nYCoord > .top+.height-.rowheight/3		&& Bottom thirds of bottom row
>        .doscroll(3)								&& Scroll page down
>    ENDCASE
>  ELSE	&& On vertical bar area
>    lnVerticalBarEnd = .height - iif(.scrollbars = 3, sysmetric(8), 0)
>    DO case
>      CASE between(nYCoord-.top, 0, sysmetric(6))    	&& On Top scroll arrow
>        .DoScroll(0)								&& Scroll up
>      CASE between(nYCoord-.top, ;
>          lnVerticalBarEnd - sysmetric(6), ;
>          lnVerticalBarEnd)						&& On bottom scroll arrow
>        .DoScroll(1)								&& Scroll down
>    ENDCASE
>  ENDIF
>  .activatecell(nNewRow,.activecolumn)
>  .refresh
>ENDWITH
>
Cetin
--
FE AVP&Cie
Directeur du département Français
Armoni Informatique
Sydev Applications
MS VFP MVP
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform