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.
Hi,
I changed the code to add a button and a ComboBox before the UltraComboEditor and it still seems to work fine for me.
Perhaps you could post a sample demonstrating the problem.
Here is the test app. It is modified so that it has the problem as I described.
I ran your sample and it works fine for me. I think you might be getting confused about what's happening here.
When you run this sample, the form is not wide enough to fit all of the controls. So the UltraComboEditor is not visible at all. All you see initially is the button, the ComboBox, and then a blank space and then at the far end of the ToolStrip is the ToolStrips overflow button. This is not the UltraComboEditor dropdown button, it's a button indicating that there are more tools.
You will get exactly the same behavior if you replace the UltraComboEditor with another MS ComboBox or any control of about the same width that doesn't fit on the form.
I got back to this project recently and the problem was solved by using the latest service releases.
Your sample works fine for me in both 9.1 and 9.2. But I, of course, am using the latest service release for both.
A difference I noticed was that in your original app the 9.1 version was used and that I am using the 9.2 version. Is it possible that the differences come from that?
So you are saying that if you run the sample that you attached here, you initially do not see the UltraComboEditor, but instead you see a space and the overflow arrow. Which is the same thing I see.
But when you make the form wider, the UltraComboEditor is not appearing in the correct place on the ToolStrip, but is instead appearing in the upper left?
Those are not the results I get - the UltraComboEditor shows up right where it is supposed to on my machine.
So this must be a problem specific to your machine. It seems unlikely, but perhaps there was an issue with the UltraComboEditor which has been fixed and you are just using an older version. Try getting the latest service release and see if that helps.
How to get the latest service release - Infragistics Community
When I add a normal windows combobox and set it's size to be too large to fit on the toolstrip I do get the arrow button. When I resize the form to be wide enough the control jumps into place. When I try making the form wider while the UltraComboEditor is on the toolstrip it does not jump into place, but instead it remains under the button, no matter how wide I make the form.