Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Network:
Windows 2003 Server
>I am working with a grid. I am running into a conflict between two options that I want for the display: I want the row that the user clicks on to be highlighted (HighlightBackcolor / HighlightForecolor), and I wany any columns in the display with .NULL. date values to display as blank.
>
>I am using a textbox-based class for all of the columns in the grid. For the columns that contain dates, I set the NullDisplay value to ' '. In order for this to work, I must set the date columns' sparse property to .F.
>
>In order to get the row to highlight when the user selects it, I have set the grid's HighlightBackcolor and HighlightForecolor to my desired colors, the AllowCellSelection property to .F., and the Sparse properties of the grid's columns to .T.
>
>The columns can't have Sparse property set to both .T. and .F., so I have set all of the columns in the grid to Sparse = .T. except for those containing dates, which have Sparse = .F.
>
>When the grid runs, the columns with .NULL. dates do show blank, but for the cells of those columns in the selected row, the background is not correct.
>
>Of course the other columns do show the correct HighlightBackcolor and HighlightForecolor.
>
>Is there any alternative to this compromise? Can I have both the NullDisplay I want, and have the cells in the selected row show the correct HighlightBackcolor and HighlightForecolor?
>
>Thanks,
>Jim
I got this working. Turns out there is no need for me to know if the user has clicked on that row in order to get the BackColor to display properly. If I make the textbox transparent (BackStyle=0 and BorderStyle=0), the grid HighligtBackcolor shines through. And, since the column sparse property is .F., the NullDisplay property works correctly on all cells of the column as well.
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