From a0f4af6597ff2a3b1fd471263da97622e55970b2 Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 26 Mar 2008 08:27:20 +0000 Subject: [PATCH] lcl: make questiondlg position on screencenter and have dialog borderstyle git-svn-id: trunk@14643 - --- lcl/include/promptdialog.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lcl/include/promptdialog.inc b/lcl/include/promptdialog.inc index 81b410a750..834bf43cd2 100644 --- a/lcl/include/promptdialog.inc +++ b/lcl/include/promptdialog.inc @@ -58,7 +58,7 @@ type function GetDialogCaption(idDiag: Integer): String; begin Result:='?'; - Case idDiag of + case idDiag of idDialogWarning : Result:=rsMtWarning; idDialogError : Result:=rsMtError; idDialogInfo : Result:=rsMtInformation; @@ -608,10 +608,12 @@ var ok: Boolean; begin inherited Create(nil); - MessageTxt:=aMsg; - HelpContext:=HelpCtx; - OnKeyDown:=@ButtonKeyDown; - ok:=false; + BorderStyle := bsDialog; + Position := poScreenCenter; + MessageTxt := aMsg; + HelpContext := HelpCtx; + OnKeyDown := @ButtonKeyDown; + ok := false; try i:=Low(Buttons); while i<=High(Buttons) do begin @@ -644,7 +646,7 @@ begin //DebugLn('TQuestionDlg.CreateQuestionDlg CurBtnCaption=',CurBtnCaption); if CurBtnCaption='' then begin // find default caption - Case CurBtnValue of + case CurBtnValue of mrOk : CurBtnCaption:=rsmbOk; mrCancel : CurBtnCaption:=rsmbCancel; mrYes : CurBtnCaption:=rsmbYes;