Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DragDrop into a Grid cell.
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
DragDrop into a Grid cell.
Divers
Thread ID:
00112192
Message ID:
00112192
Vues:
56
I'm new to VFP having just come from FPW 2.6 so here goes:

I'm trying to "Drop" text into a Grid cell. As it stands, the grid has a textbox control and is (RecordSource = Alias) and is using a table field in Column1 as ControlSource.

Let's say you are dragging text from oSource and you want to Drop it into a particular cell in Column1 of the grid which is, in fact, a particular record of the field which is the ContorlSource of the text box control in Column1.

There seems to be, by nature of default or previous clicking, one cell (record) of the recipient grid that is selected as your cursor enters the Grid’s air space. When you have your cursor over a particular cell and release the mouse button, how can you drop the "dragged" text into a particular cell (record/field)?

I have experimented with nXCoord,nYCoord (taking into consideration top and headerheight) to determine the record number. This works as long as record number 1 is the first cell showing in the grid but if you SCROLL down in the grid (this is the key problem), then nXCoord,nYCoord no longer reflect a particular record number.

It all boils down to, how can you programmatically relate what is showing on the screen as far as cell, with the record number that it is representing?

Any help would be appreciated. Almost anything can be changed in this example. The main idea is that I want to be able to change the content of a field of a particular record when I Drag/Drop text into a Grid.

Thanks Again.

Ed
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform