mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 13:39:21 +02:00
LCL: QuestionDlg: default dialog with memo: make sizable
git-svn-id: trunk@50800 -
This commit is contained in:
parent
2c3a45ce75
commit
627278054a
@ -621,6 +621,8 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
BeginAutoSizing;
|
||||||
|
try
|
||||||
FillChar(TextStyle, SizeOf(TTextStyle), 0);
|
FillChar(TextStyle, SizeOf(TTextStyle), 0);
|
||||||
|
|
||||||
with TextStyle do
|
with TextStyle do
|
||||||
@ -653,12 +655,17 @@ begin
|
|||||||
ReadOnly:=true;
|
ReadOnly:=true;
|
||||||
ScrollBars:=ssAutoBoth;
|
ScrollBars:=ssAutoBoth;
|
||||||
Text:=MessageTxt;
|
Text:=MessageTxt;
|
||||||
|
Anchors:=[akLeft,akTop,akRight,akBottom];
|
||||||
Parent:=Self;
|
Parent:=Self;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
FMsgMemo.Visible:=true;
|
FMsgMemo.Visible:=true;
|
||||||
|
BorderStyle := bsSizeable;
|
||||||
end else if FMsgMemo<>nil then
|
end else if FMsgMemo<>nil then
|
||||||
|
begin
|
||||||
FMsgMemo.Visible:=false;
|
FMsgMemo.Visible:=false;
|
||||||
|
BorderStyle := bsDialog;
|
||||||
|
end;
|
||||||
|
|
||||||
// calculate the width we need to display the buttons
|
// calculate the width we need to display the buttons
|
||||||
MinBtnWidth:=Max(25,MinimumDialogButtonWidth);
|
MinBtnWidth:=Max(25,MinimumDialogButtonWidth);
|
||||||
@ -722,6 +729,9 @@ begin
|
|||||||
CurBtnSize.X, CurBtnSize.Y);
|
CurBtnSize.X, CurBtnSize.Y);
|
||||||
inc(CurBtnPos, CurButton.Width + cBtnDist);
|
inc(CurBtnPos, CurButton.Width + cBtnDist);
|
||||||
end;
|
end;
|
||||||
|
finally
|
||||||
|
EndAutoSizing;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TQuestionDlg.ShowModal: TModalResult;
|
function TQuestionDlg.ShowModal: TModalResult;
|
||||||
|
Loading…
Reference in New Issue
Block a user