summaryrefslogtreecommitdiff
path: root/uidesigner
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2010-04-13 22:52:24 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2010-04-13 22:52:24 +0200
commita03df130f14722a89f90075685d235c0a79073c1 (patch)
treef716e6f42c4eed30ce1e18071bba005b4e127773 /uidesigner
parentae9cfcea8937917c59a58f2ecd4f4235ad70a8f0 (diff)
downloadfpGUI-a03df130f14722a89f90075685d235c0a79073c1.tar.xz
UI Designer: Single click in Object Inspector sets focus to actual edit widget.
Diffstat (limited to 'uidesigner')
-rw-r--r--uidesigner/newformdesigner.pas2
-rw-r--r--uidesigner/vfdprops.pas12
-rw-r--r--uidesigner/vfdwidgetclass.pas6
3 files changed, 20 insertions, 0 deletions
diff --git a/uidesigner/newformdesigner.pas b/uidesigner/newformdesigner.pas
index 87feed33..b974d262 100644
--- a/uidesigner/newformdesigner.pas
+++ b/uidesigner/newformdesigner.pas
@@ -839,6 +839,8 @@ begin
NameDrag := False
else
inherited;
+ if (Editor <> nil) and (Editor.Visible) then
+ Editor.SetFocus;
end;
procedure TwgPropertyList.HandleMouseScroll(x, y: integer;
diff --git a/uidesigner/vfdprops.pas b/uidesigner/vfdprops.pas
index 99e932a5..687254ea 100644
--- a/uidesigner/vfdprops.pas
+++ b/uidesigner/vfdprops.pas
@@ -115,6 +115,7 @@ type
procedure StoreStrValue(wg: TfpgWidget);
procedure LoadFloatValue(wg: TfpgWidget);
procedure StoreFloatValue(wg: TfpgWidget);
+ procedure SetFocus; override;
end;
@@ -124,6 +125,7 @@ type
procedure CreateLayout; override;
procedure LoadValue(wg: TfpgWidget); override;
procedure StoreValue(wg: TfpgWidget); override;
+ procedure SetFocus; override;
end;
@@ -398,6 +400,11 @@ begin
end;
end;
+procedure TGeneralPropertyEditor.SetFocus;
+begin
+ Edit.SetFocus;
+end;
+
procedure TGeneralPropertyEditor.StoreValue(wg: TfpgWidget);
begin
case etype of
@@ -692,6 +699,11 @@ begin
SetEnumProp(wg, prop.Name, chl.Text);
end;
+procedure TChoicePropertyEditor.SetFocus;
+begin
+ chl.SetFocus;
+end;
+
{ TBooleanPropertyEditor }
procedure TBooleanPropertyEditor.LoadValue(wg: TfpgWidget);
diff --git a/uidesigner/vfdwidgetclass.pas b/uidesigner/vfdwidgetclass.pas
index 51513dd5..059aaf79 100644
--- a/uidesigner/vfdwidgetclass.pas
+++ b/uidesigner/vfdwidgetclass.pas
@@ -47,6 +47,7 @@ type
procedure CreateLayout; virtual;
procedure LoadValue(wg: TfpgWidget); virtual;
procedure StoreValue(wg: TfpgWidget); virtual;
+ procedure SetFocus; virtual;
end;
@@ -239,5 +240,10 @@ begin
// if PPropInfo^.PropType^.name =
end;
+procedure TVFDPropertyEditor.SetFocus;
+begin
+ // do nothing
+end;
+
end.