Closed larryw3i closed 2 years ago
Looking forward to the new release.
Hi. All tests have failed :(. I think this solution requires another re-thinking. Maybe, an additional option like update_with_auto_by_items
must be added.
_selection_box_width
has indeed been changed -->
https://github.com/ppizarror/pygame-menu/blob/master/test/test_widget_dropselect.py#L35#L40
Because its default value is 0
, I think it's reasonable.
https://github.com/ppizarror/pygame-menu/runs/5217122378?check_suite_focus=true#step:5:711
😂
Shall I update the test file?
I think I have used custom function to solve this problem, thank you very much, pygame_ menu is powerful, I will close issue
and pull request
.
def update_selection_box_width(self):
for ds in [
self.subject_dropselect,
self.subject_game_dropselect,
self.difficulty_dropselect]:
ds._selection_box_width = max(
[b.get_width() for b in ds._option_buttons]
) + ds._selection_box_inflate[0]
ds._make_selection_drop()
ds.render()
Great. Thanks for your intention to fix this issue. If you have any feature suggestion or want to contribute with a new widget it would be fantastic. Greetings!
Can the width of dropselect's options be set to auto? #386 It works for me now.