如何动态创建菜单?
详细说明我想:
如何做到这一点?
答案 0 :(得分:0)
Dim menu As New RibbonControl
Dim aPage As New RibbonPage("Nicks Page")
'groups
Dim aGroup1 As New RibbonPageGroup("1st Group")
'ADD BUTTONS TO RIBBON GROUP HERE
Dim i As New DevExpress.XtraBars.BarButtonItem()
i.Caption = "Nicks Button"
aGroup1.ItemLinks.Add(i)
Dim i2 As New DevExpress.XtraBars.BarButtonItem()
i2.Caption = "Nicks Other Button"
aGroup1.ItemLinks.Add(i2)
aPage.Groups.Add(aGroup1)
menu.Pages.Add(aPage)
Me.Controls.Add(menu)