Reputation: 413
Is there a way to provide a border for the memo box? I am currently putting the memo in a rectangle to give it a border and setting each of the memo margins to 1. I hate that I have to use this workaround. Using XE6 and XE7.
Upvotes: 0
Views: 653
Reputation: 1
procedure TVariableHeight.Memo1Paint(Sender: TObject; Canvas: TCanvas;
const ARect: TRectF);
begin
if Canvas.BeginScene then
begin
with Canvas do
begin
Fill.Color := TAlphaColorRec.White;
FillRect(RectF(0, 0, Memo1.Width, 1), 0, 0, AllCorners, 1);
FillRect(RectF(0, 0, 1, Memo1.Height), 0, 0, AllCorners, 1);
FillRect(RectF(Memo1.Width, 0, Memo1.Width - 1, Memo1.Height), 0, 0,
AllCorners, 1);
FillRect(RectF(0, Memo1.Height, Memo1.Width, Memo1.Height - 1), 0, 0,
AllCorners, 1);
end;
Canvas.EndScene;
end;
end;
Upvotes: 0
Reputation: 964
Only updating style for TMemo or use your workaround with TRectangle
Thanks
Upvotes: 1