[Lazarus] ComponentList OnClassSelected

Sandro Cumerlato sandro.cumerlato at gmail.com
Wed Mar 18 17:02:53 CET 2015


Hello,
attached patch brings to front the designer form when a component is
selected from the ComponentList.

Please review it and apply if OK.

Sandro Cumerlato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150318/703dea13/attachment-0002.html>
-------------- next part --------------
Index: ide/componentlist.pas
===================================================================
--- ide/componentlist.pas	(revisione 48409)
+++ ide/componentlist.pas	(copia locale)
@@ -34,7 +34,7 @@
 uses
   Classes, SysUtils, LCLType, Forms, Controls, Graphics, StdCtrls, ExtCtrls,
   ComCtrls, ButtonPanel, Menus, LazarusIDEStrConsts, ComponentReg, PackageDefs,
-  IDEImagesIntf, TreeFilterEdit, FormEditingIntf;
+  IDEImagesIntf, TreeFilterEdit, FormEditingIntf, ComponentPalette;
 
 type
 
@@ -443,6 +443,8 @@
     IDEComponentPalette.Selected := AComponent;
     FKeepSelected := True;
     Close;
+    if Assigned(TComponentPalette(IDEComponentPalette).OnClassSelected) then
+      TComponentPalette(IDEComponentPalette).OnClassSelected(Self);
   end;
 end;
 


More information about the Lazarus mailing list