Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Highlight text in a grid cell
Message
De
24/06/2002 19:28:22
 
 
À
24/06/2002 11:03:04
Denis Filer
University of Oxford
Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00671643
Message ID:
00671866
Vues:
20
Hi Denis,

The nRow and nColumn parameters are relative to the visible portion of the grid and have nothing to do with its ControlSource. You can Activate a cell not in the grid's visible display area. If I understand correctly what you are after I assume that the process of finding the value has already positioned you on the correct record in the grid's RecordSource.

Calling the grid's Refresh method will put that row in the visible portion of the grid's display. Then use the column's SetFocus() method to put the highlight on the correct cell.

So...
** Execute the code to find the recno() and column in the RecordSource
GO lnRecordNumberWithFoundValue
Grid.Refresh()
Grid.Columns(lnColumnContainingValue).SetFocus()

HTH

Pamela

>Ive added a Find function to a form with a grid, attempting to partially emulate the wonderful Browse Ctrl+F find. Having located the correct grid cell, Im having all sorts of trouble highlighting or selecting this cell so the user sees the find result. I have setfocus to the grid, tried to activate the cell using row and column and select the text. Any clues much appreciated.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform