将按钮添加到功能区组 DevExpress
如何以编程方式将按钮添加到功能区组?到目前为止,这是我的代码,成功添加了一个新的功能区页面,然后将一个功能区组添加到该页面。但我需要向 RibbonGroup 添加按钮,但它对我不起作用
Imports DevExpress.XtraBars.Ribbon
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
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
aPage.Groups.Add(aGroup1)
menu.Pages.Add(aPage)
Me.Controls.Add(menu)
End Sub
How can I add a button to a my ribbon group programmically? Here is my code so far that successfully Adds a new ribbonPage, then Adds a RibbonGroup to the page. But I need to add buttons to the ribbonGroup and its not working for me
Imports DevExpress.XtraBars.Ribbon
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
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
aPage.Groups.Add(aGroup1)
menu.Pages.Add(aPage)
Me.Controls.Add(menu)
End Sub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您将需要为功能区控件创建一个新按钮,如下所示:
然后将其添加到您的功能区页面组中
You will need to make a new button for the ribbon control as such:
Then add this to your Ribbon Page Group