Separating Component Editors is quiet easy but how can I separate the Hook (SelectionHook method) when I need "self"? Thanks, V. ______________________________________________________________
Od: Ondrej Pokorny <laza...@kluug.net> Komu: Lazarus mailing list <lazarus@lists.lazarus.freepascal.org> Datum: 22.05.2016 16:10 Předmět: Re: [Lazarus] Detect that component selected in OI.
On 22.05.2016 15:45, Vojtěch Čihák wrote:With a small correction: it must be hooked only in design time. constructor TMyTabSheet.Create(TheOwner: TComponent); begin ... if csDesigning in ComponentState then GlobalDesignHook.AddHandlerSetSelection(@HookSelection); end; You should separate the hook completely from your run-time code. Use the hook (and include IDEIntf) only in your design-time package and unit. Ondrej ---------- -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus <http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus>
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus