Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
985
Adding UltraComboEditor to windows toolstrip
posted

Hello,

 

I am trying to add a UltraComboEditor control to a toolstrip control by using the ToolStripControlHost. The control does get added to the ToolStrip, but I am getting some odd behaviour. At the point where the control should be inserted I get the selection arrow which provides the other available controls for the toolbar. When I press the arrow I see the UltraComboEditor, so it has been added to the toolstrip.

Even when I add the UltraEditorCombo to the beginning of the toolstrip I am having this issue, so it is not related to the position of the control on the toolstrip. When I try it with a regular windows control there is no problem at all it seems to work perfectly.

The code I use is as follows:

            Dim dropdownCheck = New Infragistics.Win.UltraWinEditors.UltraComboEditor
            dropdownCheck.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList
            dropdownCheck.CheckedListSettings.CheckBoxStyle = Infragistics.Win.CheckStyle.CheckBox
            dropdownCheck.CheckedListSettings.EditorValueSource = Infragistics.Win.EditorWithComboValueSource.CheckedItems
            dropdownCheck.CheckedListSettings.ItemCheckArea = Infragistics.Win.ItemCheckArea.Item
            dropdownCheck.Items.Add(New Infragistics.Win.ValueListItem("TestValue"))
            dropdownCheck.Items.Add(New Infragistics.Win.ValueListItem("TestValue2"))
            dropdownCheck.Items.Add(New Infragistics.Win.ValueListItem("TestValue3"))
            dropdownCheck.AutoSize = True

            Dim dropdownCheckToolStripControlHost As New ToolStripControlHost(dropdownCheck)

            ToolStrip1.SuspendLayout()

            ToolStrip1.Items.add( dropdownCheckToolStripControlHost)
            ToolStrip1.ResumeLayout()

Parents Reply Children