ExCtrls: Use English language in demo project.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8151 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-11-22 18:42:46 +00:00
parent 7332a8c1e4
commit 4111ff1ff1
2 changed files with 56 additions and 74 deletions

View File

@ -8,7 +8,7 @@ object DemoForm: TDemoForm
ClientHeight = 563 ClientHeight = 563
ClientWidth = 686 ClientWidth = 686
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '2.0.12.0' LCLVersion = '2.3.0.0'
object rgButtons: TRadioGroup object rgButtons: TRadioGroup
AnchorSideLeft.Control = rgBtnAlignment AnchorSideLeft.Control = rgBtnAlignment
AnchorSideTop.Control = rgMessage AnchorSideTop.Control = rgMessage
@ -16,7 +16,7 @@ object DemoForm: TDemoForm
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = rgMessage AnchorSideBottom.Control = rgMessage
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 190 Left = 188
Height = 115 Height = 115
Top = 280 Top = 280
Width = 112 Width = 112
@ -50,7 +50,7 @@ object DemoForm: TDemoForm
Left = 24 Left = 24
Height = 115 Height = 115
Top = 280 Top = 280
Width = 134 Width = 132
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
@ -64,7 +64,7 @@ object DemoForm: TDemoForm
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 95 ClientHeight = 95
ClientWidth = 130 ClientWidth = 128
ItemIndex = 2 ItemIndex = 2
Items.Strings = ( Items.Strings = (
'very short' 'very short'
@ -82,7 +82,7 @@ object DemoForm: TDemoForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = rgTextAlignment AnchorSideBottom.Control = rgTextAlignment
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 334 Left = 332
Height = 77 Height = 77
Top = 179 Top = 179
Width = 322 Width = 322
@ -97,7 +97,7 @@ object DemoForm: TDemoForm
Left = 22 Left = 22
Height = 19 Height = 19
Top = 0 Top = 0
Width = 57 Width = 55
Caption = 'default' Caption = 'default'
Checked = True Checked = True
OnChange = cbDefaultFontChange OnChange = cbDefaultFontChange
@ -137,7 +137,7 @@ object DemoForm: TDemoForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = rgTextAlignment AnchorSideBottom.Control = rgTextAlignment
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 190 Left = 188
Height = 77 Height = 77
Top = 179 Top = 179
Width = 112 Width = 112
@ -172,7 +172,7 @@ object DemoForm: TDemoForm
Left = 24 Left = 24
Height = 77 Height = 77
Top = 179 Top = 179
Width = 134 Width = 132
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
@ -185,7 +185,7 @@ object DemoForm: TDemoForm
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 57 ClientHeight = 57
ClientWidth = 130 ClientWidth = 128
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'left' 'left'
@ -202,15 +202,15 @@ object DemoForm: TDemoForm
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = rgGlyphShowMode AnchorSideBottom.Control = rgGlyphShowMode
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 490 Left = 486
Height = 115 Height = 115
Top = 280 Top = 280
Width = 166 Width = 168
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 24 BorderSpacing.Left = 24
Caption = 'Dialog size limits' Caption = 'Dialog size limits'
ClientHeight = 95 ClientHeight = 95
ClientWidth = 162 ClientWidth = 164
TabOrder = 5 TabOrder = 5
object Label1: TLabel object Label1: TLabel
AnchorSideLeft.Control = gbMaxWidth AnchorSideLeft.Control = gbMaxWidth
@ -222,13 +222,12 @@ object DemoForm: TDemoForm
Width = 56 Width = 56
BorderSpacing.Left = 16 BorderSpacing.Left = 16
Caption = 'Max width' Caption = 'Max width'
ParentColor = False
end end
object seMaxWidth: TSpinEdit object seMaxWidth: TSpinEdit
AnchorSideTop.Control = gbMaxWidth AnchorSideTop.Control = gbMaxWidth
AnchorSideRight.Control = gbMaxWidth AnchorSideRight.Control = gbMaxWidth
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 88 Left = 90
Height = 23 Height = 23
Top = 12 Top = 12
Width = 58 Width = 58
@ -236,8 +235,9 @@ object DemoForm: TDemoForm
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Top = 12 BorderSpacing.Top = 12
BorderSpacing.Right = 16 BorderSpacing.Right = 16
MaxValue = 10000
TabOrder = 0 TabOrder = 0
Value = 100 Value = 500
end end
object Label2: TLabel object Label2: TLabel
AnchorSideTop.Control = seMinWidth AnchorSideTop.Control = seMinWidth
@ -247,14 +247,13 @@ object DemoForm: TDemoForm
Top = 55 Top = 55
Width = 54 Width = 54
Caption = 'Min width' Caption = 'Min width'
ParentColor = False
end end
object seMinWidth: TSpinEdit object seMinWidth: TSpinEdit
AnchorSideTop.Control = seMaxWidth AnchorSideTop.Control = seMaxWidth
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = gbMaxWidth AnchorSideRight.Control = gbMaxWidth
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 88 Left = 90
Height = 23 Height = 23
Top = 51 Top = 51
Width = 58 Width = 58
@ -262,8 +261,9 @@ object DemoForm: TDemoForm
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Top = 16 BorderSpacing.Top = 16
BorderSpacing.Right = 16 BorderSpacing.Right = 16
MaxValue = 10000
TabOrder = 1 TabOrder = 1
Value = 100 Value = 250
end end
end end
object rgPosition: TRadioGroup object rgPosition: TRadioGroup
@ -273,7 +273,7 @@ object DemoForm: TDemoForm
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = rgMsgType AnchorSideBottom.Control = rgMsgType
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 190 Left = 188
Height = 115 Height = 115
Top = 419 Top = 419
Width = 466 Width = 466
@ -331,7 +331,7 @@ object DemoForm: TDemoForm
Left = 24 Left = 24
Height = 115 Height = 115
Top = 419 Top = 419
Width = 134 Width = 132
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
BorderSpacing.Top = 24 BorderSpacing.Top = 24
@ -345,7 +345,7 @@ object DemoForm: TDemoForm
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 95 ClientHeight = 95
ClientWidth = 130 ClientWidth = 128
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'mtWarning' 'mtWarning'
@ -362,10 +362,10 @@ object DemoForm: TDemoForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = rgMessage AnchorSideBottom.Control = rgMessage
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 334 Left = 332
Height = 115 Height = 115
Top = 280 Top = 280
Width = 132 Width = 130
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
@ -379,7 +379,7 @@ object DemoForm: TDemoForm
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 95 ClientHeight = 95
ClientWidth = 128 ClientWidth = 126
ItemIndex = 2 ItemIndex = 2
Items.Strings = ( Items.Strings = (
'gsmAlways ' 'gsmAlways '
@ -431,7 +431,6 @@ object DemoForm: TDemoForm
Top = 57 Top = 57
Width = 45 Width = 45
Caption = 'lblResult' Caption = 'lblResult'
ParentColor = False
end end
end end
object gbTestStd: TGroupBox object gbTestStd: TGroupBox
@ -439,7 +438,7 @@ object DemoForm: TDemoForm
AnchorSideTop.Control = gbTest AnchorSideTop.Control = gbTest
AnchorSideRight.Control = gbFont AnchorSideRight.Control = gbFont
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 334 Left = 332
Height = 104 Height = 104
Top = 24 Top = 24
Width = 322 Width = 322
@ -479,7 +478,6 @@ object DemoForm: TDemoForm
Top = 57 Top = 57
Width = 62 Width = 62
Caption = 'lblResultStd' Caption = 'lblResultStd'
ParentColor = False
end end
object btnMessageDlg: TButton object btnMessageDlg: TButton
AnchorSideLeft.Control = btnQuestionDlg AnchorSideLeft.Control = btnQuestionDlg

View File

@ -70,13 +70,13 @@ uses
{$IF FPC_FullVersion >= 30202}System.{$IFEND}UITypes; {$IF FPC_FullVersion >= 30202}System.{$IFEND}UITypes;
const const
DLG_TITLE = 'Meine Anfrage'; DLG_TITLE = 'This is the caption of the dialog';
MSG_TEXT: array[0..4] of String = ( MSG_TEXT: array[0..4] of String = (
'abc', 'msg',
'Kurzer Text.', 'Short text',
'Das ist ein einigermaßen langer Text.', 'Text text text text text text text.',
'Dies ist ein sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr langer Text', 'This is a very very very very very very very very very very very very very very long text.',
'Dies ist ein sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr sehr langer Text' 'This is even longer, another very very very very very very very very very very very very very very very very very very very very very very long text.'
); );
@ -129,28 +129,12 @@ begin
Y := MaxInt; Y := MaxInt;
end; end;
// if cbDefaultFont.Checked then case rgButtons.ItemIndex of
case rgButtons.ItemIndex of 0: res := QuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Yes sir', 'IsCancel'], 'HTML/index.html', X, Y);
0: res := QuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Ja', 'IsCancel'], 'HTML/index.html', X, Y); 1: res := QuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Yes sir', mbNo, 'No sir', 'IsDefault', mbCancel, 'Changed my mind', 'IsCancel'], 'HTML/index.html', X, Y);
1: res := QuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Ja', mbNo, 'Nein', 'IsDefault', mbCancel, 'Abbrechen', 'IsCancel'], 'HTML/index.html', X, Y); 2: res := QuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Yes sir', mbYesToAll, 'I fully agree', mbNo, 'No sir', 'IsDefault', mbNoToAll, 'I fully disagree', mbCancel, 'Changed my mind', 'IsCancel'], 'HTML/index.html', X, Y);
2: res := QuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Ja', mbYesToAll, 'Ja zu allen', mbNo, 'Nein', 'IsDefault', mbNoToAll, 'Nein zu allen', mbCancel, 'Abbruch', 'IsCancel'], 'HTML/index.html', X, Y); 3: res := QuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Yes sir', mbYesToAll, 'I fully agree', mbNo, 'No sir', 'IsDefault', mbNoToAll, 'I fully disagree', mbCancel, 'Changed my mind', 'IsCancel', mbClose, 'Close it', mbHelp, 'I need help'], 'HTML/index.html', X, Y);
3: res := QuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Ja', mbYesToAll, 'Ja zu allen', mbNo, 'Nein', 'IsDefault', mbNoToAll, 'Nein zu allen', mbCancel, 'Abbruch', 'IsCancel', mbClose, 'Schließen', mbHelp, 'Hilfe'], 'HTML/index.html', X, Y);
end;
{
else begin
case rgButtons.ItemIndex of
0: F := CreateQuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Ja'], 0, X, Y);
1: F := CreateQuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Ja', mbNo, 'Nein', 'IsDefault', mbCancel, 'Abbrechen'], 0, X, Y);
2: F := CreateQuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Ja', mbYesToAll, 'Ja zu allen', mbNo, 'Nein', 'IsDefault', mbNoToAll, 'Nein zu allen', mbCancel, 'Abbruch'], 0, X, Y);
3: F := CreateQuestionDlgEx(DLG_TITLE, msg, mt, [mbYes, 'Ja', mbYesToAll, 'Ja zu allen', mbNo, 'Nein', 'IsDefault', mbNoToAll, 'Nein zu allen', mbCancel, 'Abbruch', mbClose, 'Schließen', mbHelp, 'Hilfe'], 0, X, Y);
else exit;
end;
F.Font.Name := cbFontName.Text;
F.Font.Size := seFontSize.Value;
res := F.ShowModal;
F.Free;
end; end;
}
lblResult.Caption := GetModalResultStr(res); lblResult.Caption := GetModalResultStr(res);
end; end;
@ -189,10 +173,10 @@ begin
msg := MSG_TEXT[rgMessage.ItemIndex]; msg := MSG_TEXT[rgMessage.ItemIndex];
helpkwd := 'HTML/index.html'; helpkwd := 'HTML/index.html';
case rgButtons.ItemIndex of case rgButtons.ItemIndex of
0: res := QuestionDlg(DLG_TITLE, msg, mt, [mbYes, 'Ja'], helpkwd); 0: res := QuestionDlg(DLG_TITLE, msg, mt, [mbYes, 'Yes sir'], helpkwd);
1: res := QuestionDlg(DLG_TITLE, msg, mt, [mbYes, 'Ja', mbNo, 'Nein', 'IsDefault', mbCancel, 'Abbrechen'], helpkwd); 1: res := QuestionDlg(DLG_TITLE, msg, mt, [mbYes, 'Yes sir', mbNo, 'No sir', 'IsDefault', mbCancel, 'Changed my mind'], helpkwd);
2: res := QuestionDlg(DLG_TITLE, msg, mt, [mbYes, 'Ja', mbYesToAll, 'Ja zu allen', mbNo, 'Nein', 'IsDefault', mbNoToAll, 'Nein zu allen', mbCancel, 'Abbruch', 'IsCancel'], helpkwd); 2: res := QuestionDlg(DLG_TITLE, msg, mt, [mbYes, 'Yes sir', mbYesToAll, 'I fully agree', mbNo, 'No sir', 'IsDefault', mbNoToAll, 'I fully disagree', mbCancel, 'Changed my mind', 'IsCancel'], helpkwd);
3: res := QuestionDlg(DLG_TITLE, msg, mt, [mbYes, 'Ja', mbYesToAll, 'Ja zu allen', mbNo, 'Nein', 'IsDefault', mbNoToAll, 'Nein zu allen', mbCancel, 'Abbruch', 'IsCancel', mbClose, 'Schließen', mbHelp, 'Hilfe'], helpkwd); 3: res := QuestionDlg(DLG_TITLE, msg, mt, [mbYes, 'Yes sir', mbYesToAll, 'I fully agree', mbNo, 'No sir', 'IsDefault', mbNoToAll, 'I fully disagree', mbCancel, 'Changed my mind', 'IsCancel', mbClose, 'Schließen', mbHelp, 'Hilfe'], helpkwd);
end; end;
lblResultStd.Caption := GetModalResultStr(res); lblResultStd.Caption := GetModalResultStr(res);
end; end;
@ -260,27 +244,27 @@ begin
btns := TDialogButtons.Create(TDialogButton); btns := TDialogButtons.Create(TDialogButton);
case rgButtons.ItemIndex of case rgButtons.ItemIndex of
0: AddBtn('Ja', mrYes); 0: AddBtn('Yes sir', mrYes);
1: begin 1: begin
AddBtn('Ja', mrYes); AddBtn('Yes sir', mrYes);
AddBtn('Nein', mrNo, true); AddBtn('No sir', mrNo, true);
AddBtn('Abbrechen', mrCancel); AddBtn('Changed my mind', mrCancel);
end; end;
2: begin 2: begin
AddBtn('Ja', mrYes); AddBtn('Yes sir', mrYes);
AddBtn('Ja zu allen', mrYesToAll); AddBtn('I fully agree', mrYesToAll);
AddBtn('Nein', mrNo, true); AddBtn('No sir', mrNo, true);
AddBtn('Nein zu allen', mrNoToAll); AddBtn('I fully disagree', mrNoToAll);
AddBtn('Abbrechen', mrCancel); AddBtn('Changed my mind', mrCancel);
end; end;
3: begin 3: begin
AddBtn('Ja', mrYes); AddBtn('Yes sir', mrYes);
AddBtn('Ja zu allen', mrYesToAll); AddBtn('I fully agree', mrYesToAll);
AddBtn('Nein', mrNo, true); AddBtn('No sir', mrNo, true);
AddBtn('Nein zu allen', mrNoToAll); AddBtn('I fully disagree', mrNoToAll);
AddBtn('Abbrechen', mrCancel); AddBtn('Changed my mind', mrCancel);
AddBtn('Schließen', mrClose); AddBtn('Close it', mrClose);
AddBtn('Hilfe', 100); AddBtn('Help me', 100);
end; end;
end; end;