Add Combo to panel in VB

Oct 5, 2009 at 5:07 AM


How do you Add ComboBox to panel in VB?


Jan 4, 2010 at 10:34 AM

this work for me in VB2008 sp1 :

Public Class Form1
    Dim RibbonComboObject As RibbonComboBox
    Dim RibbonComboElementsList As RibbonButtonList
    Dim RibbonComboElements() As RibbonButton

    Public Sub New()
    End Sub

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    End Sub

    Sub CreateComboBox()
        RibbonComboObject = New RibbonComboBox
        RibbonComboElementsList = New RibbonButtonList
        Dim z As Int32
        While z < 3
            ReDim RibbonComboElements(z)
            RibbonComboElements(z) = New RibbonButton
            RibbonComboElements(z).Text = "Element " & z
            RibbonComboElements(z).Tag = z
            AddHandler RibbonComboElements(z).Click, AddressOf RibbonComboElements_Click
            z = z + 1
        End While
    End Sub

    Private Sub RibbonComboElements_Click(ByVal sender As RibbonButton, ByVal e As EventArgs) Handles MyBase.Click
        RibbonComboObject.TextBoxText = sender.Text
    End Sub
End Class

Jan 4, 2010 at 10:57 AM

using the toolbox..

May 16, 2013 at 1:27 PM
Hi, a new version of Ribbon is released. Please visit the new site for latest fixes, releases, information and downloads.
New site: