View Issue Details

IDProjectCategoryView StatusLast Update
0016789PatchesOtherpublic2010-07-03 00:40
ReporterEugen Bolz Assigned ToPaul Ishenin  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.9.29 (SVN) 
Summary0016789: Anchordock: OnStartDock-Event
DescriptionHey,

this Patch, passes the TForm.OnStartDock to TAnchorDockHostSite.OnStartDock, now we can create our own TDragDockObject while using AnchorDock :)
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

2010-06-25 16:25

 

anchordocking_OnStartDock.patch (1,154 bytes)   
Index: anchordocking.pas
===================================================================
--- anchordocking.pas	(Revision 26288)
+++ anchordocking.pas	(Arbeitskopie)
@@ -308,6 +308,7 @@
     property Pages: TAnchorDockPageControl read FPages;
     property SiteType: TAnchorDockHostSiteType read FSiteType;
     property BoundSplitter: TAnchorDockSplitter read FBoundSplitter;
+    property OnStartDock;
   end;
   TAnchorDockHostSiteClass = class of TAnchorDockHostSite;
 
@@ -519,6 +520,13 @@
     property PageClass: TAnchorDockPageClass read FPageClass write FPageClass;
   end;
 
+  { TControl_Hack }
+
+  TControl_Hack = class(TControl)
+  published
+    property OnStartDock; // was Protected
+  end;
+
 var
   DockMaster: TAnchorDockMaster = nil;
 
@@ -1827,6 +1835,10 @@
           AControl.Visible:=true;
           if not AddDockHeader then
             Site.Header.Parent:=nil;
+
+          // Pass the Form's OnStartDock to the Site
+          if Assigned(TControl_Hack(AControl).OnStartDock) then
+            Site.OnStartDock := TControl_Hack(AControl).OnStartDock;
         except
           FreeAndNil(Site);
           raise;

Mattias Gaertner

2010-06-27 14:11

manager   ~0038827

1. the event object can be deleted, so the method will become invalid.
2. The TAnchorDockSite can be deleted automatically and then the OnStartEvent is no longer there.

Can you give an example what you want to achieve? Maybe I can help find a better solution.

Eugen Bolz

2010-06-27 16:59

reporter   ~0038835

What I wanted to achieve was a solution for 0016782 , so that everyone could create a custom TDragDockObject, if they need it...

But if the TDragDockObject (attached in 0016782) would be implemented in AnchorDock, then this Patch could be closed ;)

Paul Ishenin

2010-06-30 00:44

manager   ~0038879

Reporter ask to close the issue.

Issue History

Date Modified Username Field Change
2010-06-25 16:25 Eugen Bolz New Issue
2010-06-25 16:25 Eugen Bolz File Added: anchordocking_OnStartDock.patch
2010-06-25 16:25 Eugen Bolz Widgetset => Win32/Win64
2010-06-27 14:11 Mattias Gaertner LazTarget => -
2010-06-27 14:11 Mattias Gaertner Note Added: 0038827
2010-06-27 14:11 Mattias Gaertner Assigned To => Mattias Gaertner
2010-06-27 14:11 Mattias Gaertner Status new => feedback
2010-06-27 16:59 Eugen Bolz Note Added: 0038835
2010-06-30 00:44 Paul Ishenin Note Added: 0038879
2010-06-30 05:18 Mattias Gaertner Assigned To Mattias Gaertner => Paul Ishenin
2010-06-30 05:18 Mattias Gaertner Status feedback => resolved
2010-06-30 05:18 Mattias Gaertner Resolution open => fixed
2010-07-03 00:40 Eugen Bolz Status resolved => closed