7

如何从 XE3 中的 TCategoryPanel 和 TCategoryPanelGroup 中删除边框?

试过这个并没有用:

type
   TCategoryPanel =  class (Vcl.ExtCtrls.TCategoryPanel)
protected
   procedure  CreateParams ( var  Params: TCreateParams);  override ;
end ;

procedure  TCategoryPanel.CreateParams ( var  Params: TCreateParams);
begin
  Inherited ;
  Params.Style:= Params.Style  and  not  WS_BORDER;
end ;
4

1 回答 1

8

因为TCategoryPanel您需要将受保护的属性设置BevelOuterbvNone.

因为TCategoryPanelGroup您确实可以删除CreateParams. 像这样:

Params.Style := Params.Style and (not WS_BORDER);

它看起来像这样:

在此处输入图像描述

于 2013-04-14T21:24:51.127 回答