question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Combobox popup width changes with variable Combobox item sizes

See original GitHub issue

Describe the bug When the combo box items are different sizes, the popup changes it’s width while scrolling wich makes it quite unusable.

To Reproduce Create a combo that forces to display a scroll, width of different item sizes:

  <ComboBox SelectedIndex="0">
    <ComboBoxItem>Example Item 01</ComboBoxItem>
    <ComboBoxItem>Example Item 02</ComboBoxItem>
    ... etc ...
    <ComboBoxItem>Very very very very very very very long item</ComboBoxItem>
    <ComboBoxItem>Example Item 25</ComboBoxItem>
    <ComboBoxItem>Example Item 26</ComboBoxItem>
    ... etc ...
  </ComboBox>

combo

Expected behavior The width of the popup should be the max width of the longest item in the combo.

Desktop (please complete the following information):

  • OS: Windows
  • Version master latest.

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkatz6commented, Apr 14, 2023

Yes

1reaction
maxkatz6commented, Apr 14, 2023

Well, the reason I reported this, is because it was working as expected in 0.10.x and the default panel for ComboBox was already a VirtualizingStackPanel.

In 0.10 ComboBox wasn’t virtualized by default. So it makes sense that it worked before. Now, there is no context information for the combobox to know possible width of unrealized items.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with ComboBox dropdown width after changing ...
I'm working on an Java app that changes components size after it's window size changes and i have a problem with ComboBox dropdown....
Read more >
ComboBox.DropDownWidth Property (System.Windows. ...
Gets or sets the width of the of the drop-down portion of a combo box. ... This event handler changes the color, size...
Read more >
Change size of combobox dropdown column width
I have a combobox on a userform and the dropdown list contains only one column of two-letter codes (they come from the spreadsheet)....
Read more >
Adjust combo box drop down list width to longest string width
Automatically adjust the width of the drop down list of a combo box to the width of its longest item string.
Read more >
COMBO-BOX phrase
The INNER-LINES option in a SIMPLE combo-box definition is ignored. size-phrase: Specifies the outside dimensions (width and height) of the combo-box widget and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found