diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-10-10 09:43:29 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-10-10 09:43:29 +0000 |
commit | 4e32162479f87cd87815be7543112095789891e6 (patch) | |
tree | 5c3711c0c079e23531640877bba623417d781a2c | |
parent | c6c1d912ae838b648a28f593d115e5b81152c36d (diff) | |
download | fpGUI-4e32162479f87cd87815be7543112095789891e6.tar.xz |
* Added double click to edit in the main form grid of Demo 21.
-rw-r--r-- | extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas index 2e13aa09..7dae329e 100644 --- a/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas +++ b/extras/tiopf/demos/Demo_21_AdrsBook_MGM/frmmain.pas @@ -26,6 +26,7 @@ type {@VFD_HEAD_END: MainForm} FMediator: TFormMediator; procedure FormShow(Sender: TObject); + procedure GridDoubleClicked(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); procedure SetupMediators; procedure miEditAddClick(Sender: TObject); procedure miEditEditClick(Sender: TObject); @@ -55,6 +56,12 @@ begin // do nothing yet end; +procedure TMainForm.GridDoubleClicked(Sender: TObject; AButton: TMouseButton; + AShift: TShiftState; const AMousePos: TPoint); +begin + miEditEditClick(nil); +end; + procedure TMainForm.SetupMediators; begin if not Assigned(FMediator) then @@ -133,6 +140,7 @@ begin Anchors := [anLeft,anRight,anTop,anBottom]; FontDesc := '#Grid'; HeaderFontDesc := '#GridHeader'; + OnDoubleClick := @GridDoubleClicked; end; btnAdd := TfpgButton.Create(self); |