I've found quite a few posting regarding a transparent TPanel and somehow
nothing fits. All I need is to place controls on a panel and let it look
like there were directly on its parent. I don't want to create a component
for this.

The panel is colored clDefault and placed on a form colored clDefault, too.
Using ParentColor := TRUE, on Ubuntu 12 with GTK2 the form is $F2F5F7 and
the panel is much darker.

I guess, I finally found a solution, but I don't really understand it:

    BevelInner := bvNone;
    BevelOuter := bvNone;
    Caption := '';
    BorderStyle := bsNone;
    ParentColor := False;
    IF Assigned (Parent) THEN Color := Parent.GetRGBColorResolvingParent;

The final line is funny. I thought, just GetRGBColorResolvingParent should
work, but it doesn't. Any idea?

Regards, Martin.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to