This is a migrated thread and some comments may be shown as answers.

RadHostItem does'nt work in my ribbonBarGroup

3 Answers 118 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Llorens Mathieu
Top achievements
Rank 1
Llorens Mathieu asked on 09 Oct 2009, 07:59 AM
I want to add some winform controls in my ribbonbargroup using the RadHostItem. I follow some tips found on this forum but they don't work for me. My ribbonBarGroup is empty

Here is my code :

Dim Foo As New TextBox 
Foo.Text = "Bar" 
Dim hostItem As New RadHostItem(toto) 
MyRibbonBarGroup.Items.Add(hostItem) 

So, I though that the proble came from the add method. I tried the same code replacing the hostItem by a RadButtonElement control and it worked fine.

That's why I think the problem comes from the radHostItem.

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 09 Oct 2009, 01:12 PM
Hello Llorens Mathieu,

Thank you for writing. You can set manually the minimum size of RadHost Item. For example:

Dim Foo As New TextBox
Foo.Text = "Bar"
Foo.MinimumSize = new Size(100,20);
Dim hostItem As New RadHostItem(toto)
toto.MinSize = new Size(100,20);
MyRibbonBarGroup.Items.Add(hostItem)

I hope this helps.

Sincerely yours,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Llorens Mathieu
Top achievements
Rank 1
answered on 19 Oct 2009, 09:49 AM
Thank you for reply, but I have this result :


The groupBar does'nt resize itself. Any idea?

Thanks
0
Peter
Telerik team
answered on 19 Oct 2009, 01:07 PM
Hi Llorens Mathieu,

I confirm the issue. I suggest using RadTextBoxElement instead of the standard text box in HostItem. Please refer to the code snippet:

Dim Foo As New Telerik.WinControls.UI.RadTextBoxElement
Foo.Text = "Bar"
Foo.MinSize = New Size(200, 20)
MyRibbonBarGroup.Items.Add(Foo)

Hope this helps. Do not hesitate to write me back if you have further questions.

Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
RibbonBar
Asked by
Llorens Mathieu
Top achievements
Rank 1
Answers by
Peter
Telerik team
Llorens Mathieu
Top achievements
Rank 1
Share this question
or