Subject Re: Another one for customizing the appearance of TIB_Grid
Author Thomas Steinmaurer
Sorry, I'm using IBO 4.2.Ee

Thomas

--- In IBObjects@y..., "Thomas Steinmaurer" <thomas.steinmaurer@a...>
wrote:
> Hi all,
>
> first of all thanks to your replys a few threads below. But now I
> have another question about the appearance of TIB_Grid.
>
> I'm using TIB_Grid with the possibility to select more than one
rows.
> I've used the OnGetCellProps event to customize background color
and
> font color according to different conditions, but now the
> highlighting of selected rows is broken.
>
> I've done something like that:
>
> procedure TfmMainForm.edLoggingGetCellProps(Sender: TObject; ACol,
> ARow: Integer; AState: TGridDrawState; var AColor: TColor; AFont:
> TFont);
> begin
> with dmMain.iquLogData do begin
> if Active and (ARow > 0) and (ACol > 0) then begin
> BufferRowNum := edLogging.DataRow[ARow];
> if (BufferRowNum > 0) and (... other conditons ...) then begin
> if not (gdSelected in AState) then begin
> // depending on additional conditions AFont and AColor
are
> set!
> end;
> end;
> end;
> end;
> end;
>
> How can be the condition "not(gdSelected in AState)" replaced by
> another one, to highlight multpile selected rows?
>
> Thanks
> Thomas