【问题标题】:How to dynamically add panels to TCategoryPanelGroup?如何将面板动态添加到 TCategoryPanelGroup?
【发布时间】:2012-03-02 13:48:12
【问题描述】:

如何动态地将面板添加到 TCategoryPanelGroup。

请举个例子,谢谢。

到目前为止,我已经尝试过了。

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

【问题讨论】:

    标签: delphi


    【解决方案1】:

    您必须创建组件,然后使用 CategoryPanelGroup 设置 CategoryPanelPanelGroup 属性。

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

    【讨论】:

    • 非常感谢,"PanelGroup" =))) 我不知道这个属性。
    猜你喜欢
    • 2010-11-23
    • 1970-01-01
    • 1970-01-01
    • 2014-01-15
    • 1970-01-01
    • 2013-05-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多