So I have a winform application that is being used by about 100 people across 5 remote desktop servers 24 hours a day for the last few years.In that time I have seen this problem a handful of times but it seems to be happening more often to one user now.Typically I see this with users with multiple monitors.
In this case I had the user log out of the system, log back on and follow all the steps that led to the bug the first time but it is not reproducible for him.It seems to affect EVERY combo box in the entire application (and there are lots of screens).
I am using appstyling I'm not sure if that has anything to do with it. I have attached a screenshot.. it almost looks like the combobox is sizing to a negative width??
I have no idea where to start tracking this down but any suggestions are welcome!
Hello,
I am just checking about the progress of this issue. Let me know If you need any further assistance on this issue?
Thank you for using Infragistics Components.
Hello Greg,
Please do not hesitate to contact with us if you need any further help on this.
Nevermind, found it. Some of the code for calculating the dropdown extents are not public so this is the closest I could get.
Not perfect but it sizes without using the autosize.
Going to try this and see if it fixes it for me.
private int ColumnWidth()
{
if (DisplayLayout.SortedBands == null) return -1;
if (DisplayLayout.SortedBands.Count < 1) return -1;
int width = DisplayLayout.SortedBands[0].GetExtent() + DisplayLayout.SortedBands[0].GetOrigin();
return width + 30;
}
protected override void OnAfterDropDown(EventArgs e)
base.OnAfterDropDown(e);
int width = ColumnWidth();
if (DropDownWidth < width) DropDownWidth = width;
protected override void OnAfterDropDownResize(EventArgs e)
base.OnAfterDropDownResize(e);
That's a good idea but it would take me a very long time to convert each combo box and columns to fixed width.I may wind up doing this.
Can you please tell me if the source code to UltraDropDown / UltraCombo is available somewhere? I'm wondering if I can see how the sizing code works I could come up with a better workaround (like size the combo to a large fixed size if width is negative).
Greg
Hello,
Could you please let me know if you have managed DropDownWidth(determines the width of the dropdown at runtime) property of your combo.
http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v12.2~Infragistics.Win.UltraWinGrid.UltraDropDownBase~DropDownWidth.html
By default its value is -1, this means that the dropdown will automatically size based on the widths of the columns it contains. It will limit itself to the size of the screen. So you could try to set it to 0, because it will use different logic for calculation of the width, or manually set the width of the dropdown. Please try this suggestion and let me know if it works for you.
I hope that this will helps you.