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!
Hi,
What version of the controls are you using? It looks like the auto-sizing logic that determines the size of the dropdown thinks that there isn't enough room for the combo to display at the correct width. There was a bug in this logic that would sometimes get the wrong screen size when using a remote desktop connection, but that bug was fixed a couple years ago. So if you are using an old version of the controls, it might be worth upgrading or trying the latest service release.
Unfortunately, the issue is happening with a very recent version of the library (13.2.20132.2010).
Just today I upgraded to 13.2.20132.2023 but unless this is a bug that was fixed in the last month or so I am not hopeful this will solve it.
Greg
Thanks for checking up, I deployed my solution but it's too soon to say if it has fixed the problem.
Hello,
Thank you for your feedback. Please feel free to contact with us if you need any further assistance on this issue.
Thank you for using Infragistics Components.
I am still seeing the problem even with the above code. I think maybe GetExtent() is returning 0 or less than zero under some circumstances?
Changing my width function to this simpler version which works for my purposes. Will let you know how it works out.
private int ColumnWidth()
{
if (DisplayLayout.Bands == null) return 999;
// this still shows up incorrectly on some RDP logins (negative width?)
//int width = DisplayLayout.SortedBands[0].GetExtent() + DisplayLayout.SortedBands[0].GetOrigin();
int width = 0;
int maxbandwidth = 0;
foreach (var band in DisplayLayout.Bands)
width = 0;
if (!band.Hidden)
foreach (var col in band.Columns)
if (!col.Hidden) width += col.Width;
}
if (width > maxbandwidth) maxbandwidth = width;
return maxbandwidth + 30;
This code still results in the control displaying the same way when the user has the problem.
Setting the width does *not* seem to work around the problem.
I think I have some more information about when it happens though.. the user who had this happen was connected on their desktop PC with two monitors, then disconnects and re-connects on their laptop which also has two screens with the application still running, although I am guessing the resolutions do not match the first PC.
Any more suggestions?
Update: This is still happening with the 2014.1 Controls.
This last time it happened when a user was connected to remote desktop with 1 screen then disconnected and reconnected with two screens.Interestingly, when I dragged the window to the other screen the combobox dropdown popped up on the wrong screen!
I think this may be a reproducible bug.