Visual Studio 2005 not letting me resize a Listbox control
Posted on 2007-03-27
I am having trouble in Visual Studio 2005 with resizing of a listbox control. I have the listbox control's Locked property = false, Enabled = true and a Size of 688, 407 with a Location of 22, 40.
What I am trying to do is change the size of the listbox to 688, 412. Seems simple right? Well Visual Studio won't let me! As soon as I change it, it snaps back to 407 almost as if it has somehow linked the two values together. I tried even changing it in the Designer.cs code for that form, but it seems to ignore that code on display. His all started happening after I set Locked = true and Enabled = false. However, I switched both of those back, tried putting down an entirely new Listbox to see if i'd corrupted the other one somehow, tried rebooting Visual Studio etc all to no avail. VS has decided it is smarter than me and won't let me make the changes. I even checked the properties and turned off SnapGrid but i'm not in Snap layout mode so it shouldn't matter.
Oh and before anyone suggests it, Listbox controls do NOT have an Autosize property.