Adding Other Controls to the RibbonBar

12 posts, 0 answers
  1. Chris Nickel
    Chris Nickel avatar
    8 posts
    Member since:
    Jan 2004

    Posted 24 Jan 2007 Link to this post

    Good Afternoon,

    I am trying to add some controls to a chunk of the ribbon bar. the control in particular i am trying to add is the radcombobox. According to your instructions in the help documentation

    <quote>To insert one of these elements into the telerik r.a.d.ribbonbar, right-click inside of a chunk or a button group and select Add an Item or Insert Sibling followed by the name of the element. You can then proceed to set the properties of the element using the Property window as you normally would. Refer to the linked topics for further information on the individual elements.</quote>

    However, when i follow these instructions the only available items are:

    • RadRibbonBarButtonGroup
    • RadButtonElement
    • ActionButtonElement
    • RadRepeatButtonElement
    • RadToggleButtonElement
    • RadCheckBoxElement
    • RadImageButtonElement
    • RadGalleryElement
    Am i missing something obvious? if now how can i get the combobox to appear in design time?

    Thanks,

    Chris.
  2. Chris Nickel
    Chris Nickel avatar
    8 posts
    Member since:
    Jan 2004

    Posted 24 Jan 2007 Link to this post

    Hello Again,

    After a little more playing around i was able to add a combo box to chunk. first i had to add a horizontal button group. then add the combobox to the button group.

    Although i have a follow up question. is it possible to add either Text, a text box or label to a chuck?

    Thanks,
    Chris.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mike
    Admin
    Mike avatar
    640 posts

    Posted 25 Jan 2007 Link to this post

    Hi Chris,

    We are glad you found a solution to your first issue. It seems that we should make the process more intuitive for one of our future releases.

    Now, to your follow up question. It is possible to add any rad element to a chunk of the ribbonbar, even though not all of the elements are listed in the "Add Item" context menu. Those items can be added programmatically to the ribbon. Attached is an application the demonstrates this approach.





    We will discuss the possible enhancement of the design time support to provide for such scenarios. We would appreciate any feedback on that.


    Regards,
    Mike
    the telerik team
  5. lprada
    lprada avatar
    15 posts
    Member since:
    Apr 2007

    Posted 30 Apr 2007 Link to this post

    Hi, a feature that will be great is the posibility of drag a drop a control form the toolbox to te ribbon. That will be great.
  6. Mike
    Admin
    Mike avatar
    640 posts

    Posted 02 May 2007 Link to this post

    Hi,

    Thank you for the nice suggestion. I will add this to our to-do list. If there aren't any technical difficulties we will introduce this for the upcoming SP1 release.


    Greetings,
    Mike
    the telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. lprada
    lprada avatar
    15 posts
    Member since:
    Apr 2007

    Posted 02 May 2007 Link to this post

    Thank you, I am looking foward to the SP1
  8. seedy
    seedy avatar
    9 posts
    Member since:
    Feb 2007

    Posted 09 May 2007 Link to this post

    This works great, but leads me to another question.

    Do RadTextBoxElement's have a property similar to 'PasswordChar'.  I am looking to use one for a password.



  9. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 10 May 2007 Link to this post

    Hi Corey,

    Yes, you can reach it using the following code:

    (radTextBoxElement1
    .Children[0] as RadTextBoxItem).PasswordChar

    We intend to expose the RadTextBoxItem as a public property in the next release.

     
    Sincerely yours,

    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. GUIjunkie
    GUIjunkie avatar
    10 posts
    Member since:
    May 2007

    Posted 08 Jun 2007 Link to this post

    i can add controls (through code) to a ribbon chunk, but cannot set the location. it doesn't seem to work.

    what i'd like is to add labels, textboxes, etc...but lay them out to where they look nice. 

    thanks...


  11. Georgi
    Admin
    Georgi avatar
    212 posts

    Posted 11 Jun 2007 Link to this post

    Hi GUIjunkie,

    When you add items in a ribbonbar chunk you should create a hierarchy of elements using RadRibbonBarButtonGroup instances. Every instance has a StripLayoutPanel that could be horizontal or vertical. In these instances you could add you elements and the StripLayoutPanel would arrange them. In addition, you could set only margins and paddings to the elements of the hierarchy.

    See the help that comes with the installation of our controls for more on using RadRibbonBar. You can also review the Building a Ribbon with RadControls for WinForms white paper.

    If you need further assistance do not hesitate to write back.
     

    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  12. Christian
    Christian avatar
    81 posts
    Member since:
    Aug 2008

    Posted 24 Nov 2010 Link to this post

    Hi,
    how can I insert a multi-column combox in a ribbonbar?
    Kind regards
    Christian
  13. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 24 Nov 2010 Link to this post

    Hello Christian,

    You need to add a RadMultiColumnComboBox to a RadMenuHostItem and add that to the RadRibbonBar. The example below (just a ribbonbar on a form) shows an sample of this.

    Imports Telerik.WinControls.UI
    Imports Telerik.WinControls
      
    Public Class Form1
      
      
        Private Sub Form1_Load(ByVal sender As System.Object, _
            ByVal e As System.EventArgs) Handles MyBase.Load
      
            Dim people As New List(Of Person)
            people.Add(New Person(1, "Richard"))
            people.Add(New Person(2, "Peter"))
            people.Add(New Person(3, "Fred"))
      
            Dim multiColomnCombo As New Telerik.WinControls.UI.RadMultiColumnComboBox()
            multiColomnCombo.DataSource = people
            multiColomnCombo.ValueMember = "Id"
            multiColomnCombo.DisplayMember = "Name"
      
            Dim hostedControl As New RadMenuHostItem(multiColomnCombo)
            Me.RadRibbonBarGroup2.Items.Add(hostedControl)
        End Sub
    End Class
      
    Public Class Person
        Private m_Id As Integer
        Private m_Name As String
      
        Public Sub New(id as Integer, name as String)
            m_Id = id
            m_Name = name
        End Sub
      
        Public ReadOnly Property Name() As String
            Get
                Return m_Name
            End Get
        End Property
      
        Public ReadOnly Property Id() As Integer
            Get
                Return m_Id
            End Get
        End Property
    End Class

    Hope that helps
    Richard
Back to Top
UI for WinForms is Visual Studio 2017 Ready