Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drag&drop grid2grid
Message
De
06/07/1998 10:39:14
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
04/07/1998 22:38:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00114247
Message ID:
00114533
Vues:
23
>>Well two grids (related) like this
Grid1                 Grid2
>>Childkey textvalue    Parentkey Textvalue
>>x1       val1         x2        cval1
>>x2       val2         x2        cval2
>>x3       val3
I want to drag&drop cval2 on to x3,val3 row. How do I ? I came to a point where I could do it by getting "current" row dropped on to (I mean grid1.dragdrop fires but not grid1.columns(x).controls(y) which is the reverse of online doc says). It seems that textbox in a grid doesn't support dragmode=Automatic. Am I missing something ? Any suggestion saving my brain cells are wellcomed. TIA.
>>Cetin
>
>it is a little easier in VFP6 where you have GridHitTest method
>but you can still calculate in VFP5 the relatiove row and column -after you get the mouse coordinates with MROW and MCOL
>
>Arnon
Hi Arnon,
Got to this point so far. Seems to work, will furnish some more before classifying :
*DragOver
LPARAMETERS oSource, nXCoord, nYCoord, nState
lnVerticalBarEnd = iif(this.scrollbars = 3,this.height-sysmetric(8),this.height)
llOnTopScrollArrow = between(nXcoord-this.left, this.width-sysmetric(5), this.width) ;
                     and between(nYCoord-this.top, 0, sysmetric(6))
llOnBottomScrollArrow = between(nXcoord-this.left, this.width-sysmetric(5), this.width) ;
                     and between(nYCoord-this.top, ;
                     lnVerticalBarEnd - sysmetric(6), ;
                     lnVerticalBarEnd)
if llOnTopScrollArrow
   this.DoScroll(0)       && Use scrollarrows to scroll via emulation
endif
if llOnBottomScrollArrow
   this.DoScroll(1)
endif
this.setfocus()           && Couldn't get rid of this one

* DragDrop
LPARAMETERS oSource, nXCoord, nYCoord
nNewRow = int((nYcoord - this.headerheight - this.top)/this.rowheight)+1
this.activatecell(nNewRow,3)             && 3 for now instead of activecolumn
thisform.text1.value = customer.cust_id  && Rest are test textboxes to see
thisform.text2.value = oSource.value     && if target & source have true values
thisform.text1.refresh
thisform.text2.refresh
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform