Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>



Programmatically adding and removings panels in TAdvPanelGroup
It is simple to programmatically add a TAdvPanel to a TAdvPanelGroup. Three methods are available for this:
- AdvPanelGroup.AddPanel: TAdvPanel; adds a panel on top of existing panels in the group
- AdvPanelGroup.InsertPanel(index: Integer): TAdvPanel; inserts a panel at position index in the group
- AdvPanelGroup.AppendPanel: TAdvPanel; adds a panel at last position in a group
with AdvPanelGroup1, AdvPanelGroup1.AppendPanel do begin Text := 'panel'+inttostr(PanelCount); Caption.Visible := true; Caption.Text := 'Programmatically inserted panel'; Caption.MinMaxButton := true; end;
begin AdvPanelGroup1.RemovePanel(0); end;
This code snippet moves the last panel to the first position:
begin AdvPanelGroup1.MovePanel(AdvPanelGroup1.PanelCount - 1,0); end;