Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3045
Is it possible to give the dropdown of UltraCombo a minimum width?
posted

I want the dropdown width to autosize (which is doing now) when the grid content is wider than the combobox's width but only shrink down to the combobox width when the content is not wide enough.

Is this possible?

  • 15
    Offline posted

    I think I found a good solution for this.  In the InitializeLayout event, set the first column's MinWidth to the width of the control (or whatever minimum width you wanted).

    e.Layout.Bands[0].Columns[0].MinWidth = cmbValue.Width;

  • 469350
    Offline posted

    Hi,

    There's no simple way to do this. You can control the width of the dropdown using the DropDownWidth property. But there's no easy way to determine what the width will be before you drop it down. You could loop through the columns and add up the widths, of course, but you would also have to account for the scrollbars and borders and the fact that sometimes the columns overlap, so it would be very tricky.