DropDownItems cannot display while be added programlly

Mar 14, 2013 at 9:37 AM
Edited Mar 14, 2013 at 9:57 AM

DropDownItems cannot be seen while added programlly, but it works in design mode.

code below:
With Me.RibbonButton3
    For i As Integer = 0 To SQLiteFunctionTable.Rows.Count - 1
        Dim btn As New RibbonButton(SQLiteFunctionTable.Rows(i).Item("Name").ToString & "()")
        btn.ToolTip = "xxxxx"
End With
I think it seemed almost the same with which generated by the Form Designer.

In fact, a list can be created and shown successfully after clicked RibbonButton3, but whose DropDownBounds.Height is zero.

Mar 14, 2013 at 1:59 PM
How many items are you trying to add?
If you exceed the screen size nothing will be displayed (no scrollbars available).
Mar 14, 2013 at 2:19 PM
Oh yes you are right :-(

It seemed that I have to split the DropDownItems into some sections. Thanks a lot.
Mar 14, 2013 at 3:09 PM
An alternative solution as described by supernorb. Use RibbonHost and .net ComboBox:

Mar 15, 2013 at 2:06 AM
I'll try this method. It's a suggestion that a RibbonComboBox inherit from ComboBox could be added in your project :-) Thanks for your reply.