dxBarManager生成权限树

Var
  count, scount: integer;
  mynode: TTreeNode;
  mysubItem: TdxBarSubItem;
Begin
  Inherited;

  For count := 0 To frmMainForm.MenuBar.ItemLinks.Count - 1 Do
  Begin
    mynode := RzCheckTree2.Items.AddFirst(RzCheckTree2.TopItem, frmMainForm.MenuBar.ItemLinks[count].Caption);
    mysubItem := TdxBarSubItem(frmMainForm.MenuBar.ItemLinks[count].Control.Item);
    For scount := 0 To mysubItem.ItemLinks.Count - 1 Do
      RzCheckTree2.Items.AddChild(mynode, mysubItem.ItemLinks[scount].Caption);
  End;
End;

posted @ 2011-04-09 23:26  delphi中间件  阅读(667)  评论(0编辑  收藏  举报