![]() ![]() If ARow = DatabaseNamesStringGrid.Row thenĭ := clAquaĭ := clWhite ĭ(Rect) ĬellText := DatabaseNamesStringGrid.Cells ĭ(Rect.Left + 2, Rect. procedure TForm1.DatabaseNamesStringGridDrawCell(Sender: TObject ĭ := clBtnFace Note that I compare the cell's row with the strnggrid's row I can't check the cell state for selected since only cell of the selected row is selected. Muliple rows have some cells of the "Selected" colour and not all cells of the cselected row have the selected colour. ![]() Suffice it to say that instead of having complete rows all with the same background colour it is a mish-mash. to select Cell2,3 you have to set the selection-property of the grid. I can't even describe exactly how it is not working I supect that if I could I would already have solved the problem. Just set the StringGrids Row and Col properties and call StringGrid. I set the DefaultDrawing property to false, and provide a method for the OnDrawCell event, shown below - but it is not working. I have a TStringGrid where the selected row (max 1, no multi-select) should always have a different background colo(u)r. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |