[Lazarus] Detect that component selected in OI.

Ondrej Pokorny lazarus at kluug.net
Sun May 22 16:10:33 CEST 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160522/589a37fc/attachment-0004.html>


More information about the Lazarus mailing list