I'm setting the BackColor of certain rows in the UltraCombo's grid and in doing so, the columns width became apparent. When resizing the the drop down, the columns width stayed the same and left a large blank and unwanted space. I've attempted at overriding the UltraCombo to catch the events for these (since they are not hit while in a grid's cell) and observed the the client rectangle, dropdownwitdh and other properties remained static.
Is there a way of getting the new width of the resized drop down and handling it?
Hi,
Is this an UltraCombo you are displaying here? It doesn't look like one - it looks more like UltraComboEditor. There are not columns, and no row or cell borders. In fact, this appears to be a dropdown in a grid cell, which means it could be just a ValueList.
Assuming it's an UltraCombo, then how are you attaching it to the grid? Are you using it as a ValueList or as an EditorControl/EditorComponent?
I think the issue here might be that you are using an UltraCombo control and you are checking the DropDownWidth on the UltraCombo control itself. Bu the grid does not actually use the control. The control simply provides an editor or a list to the grid. So the DropDownWidth on the control on the form would not be affected by anything you do in the grid. You have to get the actual dropdown being used by the grid.
Here's a screenshot which should further outline the problem I am having.
I did attempt using the AutoFitStyle property but with no success. Why must the DropDownWidth property always be -1? Otherwise I could catch the OnAfterDropDownResize event and resize it manually.
I don't think there is any easy way to get the actual width of the dropdown. But I'm a little unclear on what the issue is.
What do you mean when you say "When resizing the the drop down"? Are you enabled the DropDownResizeHandle so that the users are making the dropdown bigger and that's why there is empty space? Or are you resizing the dropdown in some other way?
I assume what you are trying to do is make the columns fill the entire width of the dropdown area - is that right? If so, then maybe all you have to do is set the AutoFitStyle property.
Hello rzabransky,
When you say "the UltraCombo's grid", are you referring to the grid in the drop-down portion of the UltraCombo or the grid the UltraCombo is embedded in?