summaryrefslogtreecommitdiff
path: root/uidesigner
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2014-10-17 00:26:08 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2014-10-17 00:26:08 +0100
commit6381d5efe324d7047d0b8026324ee46468d47b40 (patch)
treee250f29f027cabe721df20755db1934e9f472b4c /uidesigner
parent7f1e8fd139e8c79b9d917a67d4418d0eeba8f0d5 (diff)
downloadfpGUI-6381d5efe324d7047d0b8026324ee46468d47b40.tar.xz
uidesigner: replaced Grid Resolution combobox with an Integer Edit
Diffstat (limited to 'uidesigner')
-rw-r--r--uidesigner/vfdforms.pas41
1 files changed, 16 insertions, 25 deletions
diff --git a/uidesigner/vfdforms.pas b/uidesigner/vfdforms.pas
index e6b4020f..ba16fd24 100644
--- a/uidesigner/vfdforms.pas
+++ b/uidesigner/vfdforms.pas
@@ -128,7 +128,6 @@ type
public
{@VFD_HEAD_BEGIN: frmVFDSetup}
lb1: TfpgLabel;
- chlGrid: TfpgComboBox;
btnOK: TfpgButton;
btnCancel: TfpgButton;
lblRecentFiles: TfpgLabel;
@@ -144,6 +143,7 @@ type
chkCodeRegions: TfpgCheckBox;
cbIndentationType: TfpgComboBox;
lblIndentType: TfpgLabel;
+ edtGridX: TfpgEditInteger;
{@VFD_HEAD_END: frmVFDSetup}
procedure AfterCreate; override;
procedure BeforeDestruction; override;
@@ -491,7 +491,7 @@ end;
procedure TfrmVFDSetup.LoadSettings;
begin
FINIVersion := gINI.ReadInteger('Designer', 'Version', 0);
- chlGrid.FocusItem := gINI.ReadInteger('Options', 'GridResolution', 4)+1;
+ edtGridX.Value := gINI.ReadInteger('Options', 'GridResolution', 4);
tbMRUFileCount.Position := gINI.ReadInteger('Options', 'MRUFileCount', 4);
chkFullPath.Checked := gINI.ReadBool('Options', 'ShowFullPath', True);
edtDefaultExt.Text := gINI.ReadString('Options', 'DefaultFileExt', '.pas');
@@ -504,7 +504,7 @@ end;
procedure TfrmVFDSetup.SaveSettings;
begin
gINI.WriteInteger('Designer', 'Version', cDesignerINIVersion);
- gINI.WriteInteger('Options', 'GridResolution', StrToInt(chlGrid.Text));
+ gINI.WriteInteger('Options', 'GridResolution', edtGridX.Value);
gINI.WriteInteger('Options', 'MRUFileCount', tbMRUFileCount.Position);
gINI.WriteBool('Options', 'ShowFullPath', chkFullPath.Checked);
gINI.WriteString('Options', 'DefaultFileExt', edtDefaultExt.Text);
@@ -542,28 +542,6 @@ begin
Text := 'Grid resolution:';
end;
- chlGrid := TfpgComboBox.Create(self);
- with chlGrid do
- begin
- Name := 'chlGrid';
- SetPosition(144, 28, 88, 24);
- ExtraHint := '';
- FontDesc := '#List';
- Hint := '';
- Items.Add('1');
- Items.Add('2');
- Items.Add('3');
- Items.Add('4');
- Items.Add('5');
- Items.Add('6');
- Items.Add('7');
- Items.Add('8');
- Items.Add('9');
- Items.Add('10');
- FocusItem := -1;
- TabOrder := 1;
- end;
-
btnOK := TfpgButton.Create(self);
with btnOK do
begin
@@ -736,6 +714,19 @@ begin
Text := 'Indent Type for generated code:';
end;
+ edtGridX := TfpgEditInteger.Create(self);
+ with edtGridX do
+ begin
+ Name := 'edtGridX';
+ SetPosition(119, 28, 48, 24);
+ FontDesc := '#Edit1';
+ Hint := '';
+ MaxValue := 10;
+ MinValue := 1;
+ TabOrder := 18;
+ Value := 4;
+ end;
+
{@VFD_BODY_END: frmVFDSetup}
LoadSettings;