Board index » delphi » TStringGrid - OnDrawCell Event
David Platt
![]() Delphi Developer |
Wed, 05 May 2004 18:26:01 GMT
TStringGrid - OnDrawCell Event
Using D5, I have a TStringGrid component that has a one fixed row at the
top and three columns, goRowSelect property is set to true so that the entire row is selected when any cell within that row is selected. All non-fixed rows are initially shown in Bold. Once the row is selected (either by moving the cursor or clicking with mouse) the row is to be shown so that it is not bold anymore. I have written the following code in the OnDrawCell event of the TStringGrid component: procedure grdMessagesDrawCell(Sender: TObject; ACol, ARow: Integer; // the first row is fixed so don't worry about changing from bold end; This seems to work perfectly when the row is selected by scrolling up Thanks in advance, |