AdvDBLookupComboBox SelectionColor

Hi,

i try to display a color in one of the columns of the AdvDBLookupComboBox.

procedure TForm1.AdvDBLookupComboBox1DrawProp(Sender: TObject; RowIndex,
  ColIndex: Integer; DBField: TField; Value: string; AFont: TFont;
  var AColor: TColor);
begin
  if ColIndex = 0 then
    AColor := StrToIntDef(Value, clWhite);
end;

Unfortunately the SelectionColor is a Problem. It overlays my Color

For HoverColor you have done the following in the code

if (FHoverColor <> clNone) then
      FStringGrid.Canvas.Brush.Color := FHoverColor;
if (FHoverTextColor <> clNone) then
      FStringGrid.Canvas.Font.Color := FHoverTextColor;

Is it possible to do the same for SelectionColor? Or a Property ShowSelection ?

Or is there a component with which I can achieve something similar?
I want to create a LookupComboBox that displays a status and a corresponding color.

If you'd let SelectionColor override, you would not see the selected row(s) anymore.
That is why this behavior is different. Not sure if it is desirable that selected rows cannot longer be seen?

With the change

if (FSelectionColor <> clNone) then

you could decide it yourself

I would also derive the class, but i can't find a virtual starting point

Ok, we adapted this accordingly. Next update will have this change.

thank you this helps