2012-03-02 3 views
2

동적으로 패널을 TCategoryPanelGroup에 추가 할 수 있습니다.패널을 TCategoryPanelGroup에 동적으로 추가하는 방법은 무엇입니까?

예를 들어주세요, 감사합니다.

나는 지금까지 시도했다. 그런 다음 구성 요소를 작성해야합니다

procedure TWForm.BitBtn3Click(Sender: TObject); 
var 
    categorypanel: tcategorypanel; 
begin 
    categorypanel := categorypanel.Create (categorypanelgroup1); 
    categorypanel := tcategorypanel.Create(self); 
    categorypanel.caption:=edit1.text; 
end; 

답변

9

은 CategoryPanelGroup으로 CategoryPanelPanelGroup 속성을 설정합니다.

Var 
LPanel : TCategoryPanel; 
begin 
LPanel:=TCategoryPanel.Create(CategoryPanelGroup1); 
LPanel.Caption:='My Panel'; 
LPanel.PanelGroup:=CategoryPanelGroup1; 
end; 
+0

감사합니다. "PanelGroup"=))) 나는이 속성을 알지 못합니다. –

관련 문제