Has anybody experience with Delphi 2009's TCategoryPanelGroup component and specifically with dynamically adding buttons to category panels?
I can't get it to work properly. Either the buttons do not appear or the alignment is screwed up. Basic outline of what I want to do:
procedure AddButton (const Caption, Group : String);
const
ButtonSize = 55;
Border = 10;
var
CategoryPanel : TCategoryPanel;
Button : TButton;
begin
CategoryPanel := FindCategoryPanel (CategoryPanelGroup, Group);
CategoryPanel.Height := CategoryPanel.Height + ButtonSize + Border;
Button := TButton.Create (CategoryPanel);
Button.Parent := CategoryPanel;
Button.Width := ButtonSize;
Button.Height := ButtonSize;
Button.Left := 27;
Button.Top := CategoryPanel.ClientHeight - Border - ButtonSize;
end;
Any hints?