ComboBox not autoresizing on rebind of datasource
-
Hey all, Got an interesting problem where I'm using a cascaded combobox type setup, with the second combobox's IntegralHeight property set to true so that it should resize itself relative to the contents of the items list. However, it's not doing this and I'm stumped. I don't think I should have to go ownerdraw in order for this to work, so can anyone suggest a reason why it might not be working? FYI I am rebinding the combobox datasource to a datatable each time the "master" combobox value changes.
-
Hey all, Got an interesting problem where I'm using a cascaded combobox type setup, with the second combobox's IntegralHeight property set to true so that it should resize itself relative to the contents of the items list. However, it's not doing this and I'm stumped. I don't think I should have to go ownerdraw in order for this to work, so can anyone suggest a reason why it might not be working? FYI I am rebinding the combobox datasource to a datatable each time the "master" combobox value changes.
If you set the DropDownHeight property, this resets the IntegralHeight to false. Make sure you have not done so.
CodingYoshi Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
-
If you set the DropDownHeight property, this resets the IntegralHeight to false. Make sure you have not done so.
CodingYoshi Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
-
What about if you set the DropDownHeight after it is bound?
CodingYoshi Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
-
What about if you set the DropDownHeight after it is bound?
CodingYoshi Visual Basic is for basic people, C# is for sharp people. Farid Tarin '07
I've checked the code for any instances where the DropDownHeight is being set, and there aren't any - neither in the *.designer.cs or the main class *.cs file... which according to MSDN means that the width should resize if IntegralHeight is set to true (which is apparently the default but I'm setting it manually just in case). Is there nothing like a Refresh() or Invalidate() that I can call to force it to re-evaluate it's contained items automatically? I really don't want to have to resort to OwnerDrawn to sort this out...