How to apply a vcl style hook to a particular component of a form?

旧城冷巷雨未停 提交于 2019-12-06 01:08:31

You can use a interposer class for the TPageControl component

check this sample

type
  TPageControl = class(Vcl.ComCtrls.TPageControl);
  TForm1 = class(TForm)
    PageControl1: TPageControl;
    ...
    ...

And then register the vcl style hook in the same unit where the interposer class is located

  TStyleManager.Engine.RegisterStyleHook(TPageControl, TTabControlStyleHookBtnClose);

Or using a full qualified type name

  TStyleManager.Engine.RegisterStyleHook(Unit1.TPageControl, TTabControlStyleHookBtnClose);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!