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!
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?
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;
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?
Greg
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.
Thanks for checking up, I deployed my solution but it's too soon to say if it has fixed the problem.