Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Network:
Windows 2003 Server
>>Dragon,
>>
>>Thanks for your quick reply. I wasn't expecting anything late on a Friday of a holiday week.
>>
>>Looks like what you've given me will help.
>>
>>I was wondering though: isn't there anyway to directly address a single cell in the grid and set its properties directly, like you might do with a spreadsheet?
>
>No, because the other rows don't exist :).
>
>VFP uses a trick to display its grids. It has only one row. When a grid refreshes, that row is painted for each visible record, one at a time. The image of the row remains. The row with the focus has actual objects during the event loop - and when you click elsewhere in the grid, the row you clicked becomes the current row, i.e. it's repainted.
>
>What follows from this is that you can't address an individual cell in a grid - you can address the grid and each column, but within the column there are controls for displaying the header and the current row. Each row is current at the moment when it's painted, but after that, the one where recno(MyGrid.recordSource) points is the current row for you. And that's the context in which dynamic properties are evaluated.
>
>I hope I haven't confused you completely :).
>
>(regarding the alternate spellings of my name, I think I'm just lucky - and daughter's friends actually think it's very cool, so I just enjoy the undeserved popularity :)
Dragan,
That was a great explanation. Now, I understand why the methods and properties for grids behave the way they do.
By the way, the DynamicForeColor property worked for me just the way I needed it.
Jim
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement