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()
I ran your sample code and it works just fine for me.
Have you tried testing this with any other control? I can't see any reason why UltraComboEditor would be any different than any other control or how it could possibly behave any differently on a ToolStrip.
I am attaching my sample here so you can try it out and see if it works the same for you.
I ran the application and it worked perfectly at start. But there was one difference with my project and this sample and that's the fact that on my toolbar there were some other controls. So I added a button and a Windows combobox to the toolbar and then the behaviour I encountered before was reproduced.
I have tried adding other controls and they don't seem to have this problem.