I have created a form which I am using as a standard form with a ribbon and standard buttons. I tried to inherit this form then added another button to the ribbon and put it in a certain position but when I run the program the position is not what it suppose to be. where am I going wrong? I have added 3 attachments to demostrate this.
Thanks
Celeste
7 Answers, 1 is accepted
This will depend on how you are adding your new items to your robbon bar. I have tried this and followed these steps
- Created a base RadRibbonForm with a tab, a couple of groups and some buttons in each group
- Added a second form, and inherited from the base form
- In the load event of the second form, added in a new group, inserting it into the correct position.
In this case all shows correctly at runtime.
Please could you post a sample of how you are doing this using the format code block and I will do my best to help
thanks
Richard
My base form is in one project and the other form that i'm inheriting is in another project.
Once I have inherited from the base form all the standard buttons are there.Then I click on add new button group and add a new button. I then move the new button in between some of the standard buttons. On the Load event the new button shows up right on the end which it is not suppose to. How can I make it show up between those standard buttons?
Thanks
Celeste
I am unsure how you are managing to do this from the designer. An inherited form with a complex type such as the RadRibbonBar does not allow you to use the smart tags or designer. Adding new items to the RadRibbonBar that is on your inherited form must be done programatically. E.g.
Dim
RadRibbonBarGroup_Form1 =
New
RadRibbonBarGroup()
Dim
button
As
New
RadButtonElement()
button.Name =
"Form1Button"
button.Text =
"Form 1 Button"
RadRibbonBarGroup_Form1.Items.AddRange(
New
Telerik.WinControls.RadItem() {button})
RadRibbonBarGroup_Form1.Name =
"RadRibbonBarGroup_Form1"
RadRibbonBarGroup_Form1.Text =
"Form 1 Group 1"
Me
.RibbonTab1.Items.Insert(1, RadRibbonBarGroup_Form1)
Please can you post a sample project that demonstrates your issue?
Thanks
Richard
I got it working thanks. The code I used:
Dim RadRibbonBarGroup_FindForm = New RadRibbonBarGroup()
Dim RadRibbonBarButtonGroup_FindForm = New RadRibbonBarButtonGroupRadRibbonBarGroup_FindForm.Items.AddRange(New Telerik.WinControls.RadItem({RibbonBarButtonGroup_FindForm})
RadRibbonBarGroup_FindForm.Name =
"RadRibbonBarGroup_FormForm"
RadRibbonBarGroup_FindForm.Text = "Find"
Dim btnFind As New RadButtonElement()
btnFind.Name = "btnFind"
btnFind.Text = "Find"
btnFind.Class = "ButtonElement"
btnFind.Image = Global.culminTelFormLib.My.Resources.Resources.menu__4_()
btnFind.ImageAlignment = System.Drawing.ContentAlignment.MiddleCenter
btnFind.TextImageRelation = System.Windows.Forms.
TextImageRelation.ImageAboveText
RadRibbonBarButtonGroup_FindForm.Items.AddRange(
New Telerik.WinControls.RadItem() {btnFind})
RadRibbonBarButtonGroup_FindForm.Name =
"RadRibbonBarButtonGroup_FindForm"
RadRibbonBarButtonGroup_FindForm.Text = "RadRibbonBarButtonGroup_FindForm"
Me.tabSubForm.Items.Insert(3, RadRibbonBarGroup_FindForm)
Thanks a lot
Celeste
Glad you have it working. If you found any of my suggestions helpful, please remember to mark as answer. If you need further assistance, just let me know
thanks
Richard
- is there any way to properties of this parent RadRibbonForm to be edited and add tabs and buttons in designer editor?
We have a "framework" solution where we have a RadRibbonForm with some details (default icon, themes, tabs are collapsed, etc, ) that would be used in almost all apps that we have (+100).
in some apps, we need to add new tabs and it should not be collapsed. We would like to add them in the designer tool but RadRibbonBar is locked even it's not set to be locked.
not sure if I made myself clear.
thanks,
Ezequiel
Thank you for the writing.
I was not able to reproduce the described behavior. May be I am missing something about your case. Could you please post a code sample as this will let me investigate the acse in detail and provide you with adequate support. It will be best if you open a new support ticket and send me a sample project that I can run locally. This will help me to provide you with a quicker response.
I am looking forward to your reply.
Best wishes,
Peter
the Telerik team