uPrompt
uPrompt

Reputation: 159

Remove tcategorypanel border

How can you remove the border from TCategoryPanel and TCategoryPanelGroup in XE3?

Tried this and didn't work:

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 ;

Upvotes: 7

Views: 1553

Answers (1)

David Heffernan
David Heffernan

Reputation: 613432

For TCategoryPanel you need to set the protected property BevelOuter to bvNone.

For TCategoryPanelGroup you can indeed remove the border in CreateParams. Like so:

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

It looks like this:

enter image description here

Upvotes: 9

Related Questions