Subject | Re: [IBO] TIB_Grid and CurrentRowColor |
---|---|
Author | Helmut Steinberger |
Post date | 2002-06-29T06:00:29Z |
Ciao Nicola,
you wrote:
which is used to display the selected cell.
If you set rowselect to false, the selected row is displayed in
currentrowcolor, except the selected cell, which is still displayed in
the color of the selected cell. I solved this problem, by overriding
the getcellprops method of the grid like this:
procedure trsib_grid.GetCellProps( ACol,
ARow : Longint;
AState : TGridDrawState;
var AColor : TColor;
AFont : TFont );
begin
inherited GetCellProps(ACol, ARow, AState, AColor, AFont);
if gdfocused in astate then
acolor := currentrowcolor;
end;
HTH
Ciao
Helmut
you wrote:
>> I have set the CurrentRowColor of a TIB_Grid to clSilver, but when IIf you have rowselect to true, the whole row is displayd in the color
>> run the program the current row of my grid is always blue.
>> Can anyone help me?
which is used to display the selected cell.
If you set rowselect to false, the selected row is displayed in
currentrowcolor, except the selected cell, which is still displayed in
the color of the selected cell. I solved this problem, by overriding
the getcellprops method of the grid like this:
procedure trsib_grid.GetCellProps( ACol,
ARow : Longint;
AState : TGridDrawState;
var AColor : TColor;
AFont : TFont );
begin
inherited GetCellProps(ACol, ARow, AState, AColor, AFont);
if gdfocused in astate then
acolor := currentrowcolor;
end;
HTH
Ciao
Helmut