uPrompt
uPrompt

Reputation: 159

CategoryPanelGroup No Header

Can anyone tell me how to prevent the TCategoryPanelGroup from drawing the headers. I've attempted to set the header.height to 0 but that creates and entirely new problem. My panels have TImages on them and when I scroll the panel group, graphic artifacts get drawn on the TImage.

Unfortunately, I don't appear to be able to post an image to show you so here's how to reproduce what I see.

Resize it so that you have a vertical scroll bar. Scroll the panels and if you're like me, you'll see some graphic artifacts where the TImage is.

TCategoryPanelGroup Img Artifacts

Here's a rough of what I'm trying to achieve.

enter image description here

Upvotes: 2

Views: 1394

Answers (1)

bummi
bummi

Reputation: 27385

To avoid the artefact you can override DrawHeader of TCategoryPanel

type
  TCategoryPanel=Class(ExtCtrls.TCategoryPanel)
    procedure DrawHeader;override;
  End;

  TForm3 = class(TForm)
//.........
procedure TCategoryPanel.DrawHeader;
begin
//  inherited;

end;

Upvotes: 2

Related Questions