summaryrefslogtreecommitdiff
path: root/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-09-08 15:09:18 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2008-09-08 15:09:18 +0000
commitd45aef853670f9b826d3c6bca1aee485098c5b2d (patch)
tree15df69e56a76831773ec472a57a1ce20d4b9b96c /extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas
parentb55202b53d73ea58e7ec050191e9a6380fd38275 (diff)
downloadfpGUI-d45aef853670f9b826d3c6bca1aee485098c5b2d.tar.xz
* added an extra check to StringGrid list mediator.
* Default all auto generated data to posClean. * Added some Debug buttons in forms to view raw data properties.
Diffstat (limited to 'extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas')
-rw-r--r--extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas33
1 files changed, 32 insertions, 1 deletions
diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas
index 8a8aeb1c..e414937c 100644
--- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas
+++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmcontactmaint.pas
@@ -34,11 +34,13 @@ type
btnAdd: TfpgButton;
btnEdit: TfpgButton;
btnDelete: TfpgButton;
+ btnDebug: TfpgButton;
{@VFD_HEAD_END: ContactEditForm}
FMediator: TFormMediator;
FAdrsMediator: TFormMediator;
procedure SetData(const AValue: TContact);
procedure SetupMediators;
+ procedure btnDebugClicked(Sender: TObject);
public
procedure AfterCreate; override;
property Data: TContact read FData write SetData;
@@ -52,7 +54,7 @@ function EditContact(AData: TContact): Boolean;
implementation
uses
- contactmanager;
+ contactmanager, tiDialogs;
function EditContact(AData: TContact): Boolean;
@@ -95,6 +97,11 @@ begin
FAdrsMediator.Active := True;
end;
+procedure TContactEditForm.btnDebugClicked(Sender: TObject);
+begin
+ tiShowString(FData.AsDebugString);
+end;
+
procedure TContactEditForm.SetData(const AValue: TContact);
begin
if FData=AValue then exit;
@@ -115,6 +122,7 @@ begin
Name := 'lblName1';
SetPosition(8, 8, 80, 16);
FontDesc := '#Label1';
+ Hint := '';
Text := 'Firstname:';
end;
@@ -134,6 +142,7 @@ begin
Name := 'lblName2';
SetPosition(8, 52, 80, 16);
FontDesc := '#Label1';
+ Hint := '';
Text := 'Lastname:';
end;
@@ -153,6 +162,7 @@ begin
Name := 'lblName3';
SetPosition(8, 96, 80, 16);
FontDesc := '#Label1';
+ Hint := '';
Text := 'EMail:';
end;
@@ -172,6 +182,7 @@ begin
Name := 'lblName4';
SetPosition(8, 140, 80, 16);
FontDesc := '#Label1';
+ Hint := '';
Text := 'Mobile:';
end;
@@ -191,6 +202,7 @@ begin
Name := 'lblName5';
SetPosition(8, 184, 80, 16);
FontDesc := '#Label1';
+ Hint := '';
Text := 'Comments:';
end;
@@ -210,6 +222,7 @@ begin
Name := 'lblName6';
SetPosition(264, 8, 80, 16);
FontDesc := '#Label1';
+ Hint := '';
Text := 'Addresses:';
end;
@@ -229,6 +242,7 @@ begin
SetPosition(364, 300, 80, 24);
Text := 'Save';
FontDesc := '#Label1';
+ Hint := '';
ImageName := '';
TabOrder := 12;
ModalResult := mrOK;
@@ -241,6 +255,7 @@ begin
SetPosition(448, 300, 80, 24);
Text := 'Cancel';
FontDesc := '#Label1';
+ Hint := '';
ImageName := '';
TabOrder := 13;
ModalResult := mrCancel;
@@ -253,6 +268,7 @@ begin
SetPosition(264, 152, 52, 24);
Text := 'Add';
FontDesc := '#Label1';
+ Hint := '';
ImageName := '';
TabOrder := 14;
end;
@@ -264,6 +280,7 @@ begin
SetPosition(320, 152, 52, 24);
Text := 'Edit';
FontDesc := '#Label1';
+ Hint := '';
ImageName := '';
TabOrder := 15;
end;
@@ -275,10 +292,24 @@ begin
SetPosition(376, 152, 52, 24);
Text := 'Delete';
FontDesc := '#Label1';
+ Hint := '';
ImageName := '';
TabOrder := 16;
end;
+ btnDebug := TfpgButton.Create(self);
+ with btnDebug do
+ begin
+ Name := 'btnDebug';
+ SetPosition(8, 300, 100, 24);
+ Text := 'Debug (Show)';
+ FontDesc := '#Label1';
+ Hint := '';
+ ImageName := '';
+ TabOrder := 17;
+ OnClick := @btnDebugClicked;
+ end;
+
{@VFD_BODY_END: ContactEditForm}
end;