I am trying to create an TCustomRichEdit with some speedbuttons above it. How can I accomplish this behaviour? The height of the component needs to be the buttons + the richedit.
[B][I][U]
+-------+
|A1REdit|
| |
+-------+
Currently I have the following code:
private
FBoldButton: TSpeedButton;
constructor TA1RichEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FBoldButton := TSpeedButton.Create(Self);
FBoldButton.Parent := Self;
end;
destructor TA1RichEdit.Destroy;
begin
FreeAndNil(FBoldButton);
inherited;
end;
This paints the speedbutton on the richedit (because the richedit is the parent), I need the button to be above the richedit. The richedit doesnt paint itself like it should be after this piece of code.