Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>



Show inplace editor in a special color
By design, the background color of the inplace editor is shown in the same color as the cell background color. This way, the inplace editor looks transparent wrt the grid. If there is a need to show the inplace editor with a different background color, to draw attention for example, following code can be used:
procedure TForm4.AdvStringGrid1GetCellColor(Sender: TObject; ARow, ACol: Integer; AState: TGridDrawState; ABrush: TBrush; AFont: TFont); begin if (AdvStringGrid1.EditMode) and (ARow = AdvStringGrid1.Row) and (ACol = AdvStringGrid1.Col) then ABrush.Color := clRed else ABrush.Color := clWhite; end;