Hi, I create a TCustomControl descendant and @runtime I position it at the exact position of anoher control (TEdit) then set it's parent to the other controls parent (the same form in this case). On Windows, the new control is drawn over the TEdit (as I want, probably just by luck), but on GTK2 it is drawn behind the TEdit.
BringToFront does not help. Obviously I'm doing something wrong here, but what. The code looks something like this: procedure TTextHintOverlay.ShowOverlay; var BRect: TRect; begin if not CanShow then Exit; //before you ask, CanShow is True, I checked BRect := FEdit.BoundsRect; if FEdit.BorderStyle = bsSingle then InflateRect(BRect, -2, -2); BoundsRect := BRect; .... Parent := FEdit.Parent; //Form1 in this case Visible := True; BringToFront; end; I thought it might have to do with the order in which events are handled, but even when I later find the component on the form and do BringToFront it does not work. I also tried to do SendToBack on the TEdit, but to no avail. Any thoughts? Bart -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus