summaryrefslogtreecommitdiff
path: root/extras/tiopf/gui
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-23 14:45:47 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-03-23 14:45:47 +0000
commitb3d0fa099f95a2ef19fc35ec24d4749c28e74974 (patch)
tree33a949b687dfb9b31cfefae122c974013eeea296 /extras/tiopf/gui
parent49e51459783e1de062551fe86ae7030582c81aa7 (diff)
downloadfpGUI-b3d0fa099f95a2ef19fc35ec24d4749c28e74974.tar.xz
* minor changes for tiOPF mediators.
Diffstat (limited to 'extras/tiopf/gui')
-rw-r--r--extras/tiopf/gui/tiCompositeMediators.pas14
-rw-r--r--extras/tiopf/gui/tiGenericListMediators.pas7
2 files changed, 14 insertions, 7 deletions
diff --git a/extras/tiopf/gui/tiCompositeMediators.pas b/extras/tiopf/gui/tiCompositeMediators.pas
index 4ac4fece..34417aa8 100644
--- a/extras/tiopf/gui/tiCompositeMediators.pas
+++ b/extras/tiopf/gui/tiCompositeMediators.pas
@@ -24,14 +24,14 @@ type
{ Composite mediator for TfpgListView }
TCompositeListViewMediator = class(TtiObject)
private
- FIsObserving: Boolean;
- FDisplayNames: string;
- FShowDeleted: Boolean;
function GetSelectedObject: TtiObject;
procedure SetSelectedObject(const AValue: TtiObject);
procedure SetShowDeleted(const AValue: Boolean);
procedure DoCreateItemMediator(AData: TtiObject);
protected
+ FIsObserving: Boolean;
+ FDisplayNames: string;
+ FShowDeleted: Boolean;
FView: TfpgListView;
FModel: TtiObjectList;
FMediatorList: TObjectList;
@@ -98,7 +98,8 @@ type
FModel: TtiObject;
FView: TfpgLVItem;
FDisplayNames: string;
- procedure SetupFields;
+ protected
+ procedure SetupFields; virtual;
public
constructor CreateCustom(AModel: TtiObject; AView: TfpgLVItem; const ADisplayNames: string; IsObserving: Boolean = True);
procedure BeforeDestruction; override;
@@ -130,6 +131,11 @@ type
end;
+function tiFieldName(const AField: string): string;
+function tiFieldWidth(const AField: string): integer;
+function tiFieldCaption(const AField: string): string;
+
+
implementation
uses
diff --git a/extras/tiopf/gui/tiGenericListMediators.pas b/extras/tiopf/gui/tiGenericListMediators.pas
index 52aa60ed..4f15b9d1 100644
--- a/extras/tiopf/gui/tiGenericListMediators.pas
+++ b/extras/tiopf/gui/tiGenericListMediators.pas
@@ -215,8 +215,8 @@ begin
selected := View.FocusItem;
end;
- ptr := View.OnSelect;
- View.OnSelect := nil;
+ ptr := View.OnChange;
+ View.OnChange := nil;
View.Items.BeginUpdate;
try
View.Items.Clear;
@@ -237,7 +237,7 @@ begin
finally
View.Items.EndUpdate;
view.Update;
- View.OnSelect := ptr;
+ View.OnChange := ptr;
HandleSelectionChanged;
end;
end;
@@ -349,6 +349,7 @@ begin
end;
finally
View.Items.EndUpdate;
+ View.FocusItem := 1;
View.OnChange := ptr;
HandleSelectionChanged;
end;