pygame-menu
pygame-menu copied to clipboard
Dropselect not working in scrollable Frame
- SO: win
- python version: v3.6.4
- pygame version: v2.12
- pygame-menu version: v4.2.8
Dropselect not working in scrollable Frame (does not show selectable items)
In a non-scrollable frame everything works fine
To Reproduce `import pygame_menu import pygame pygame.init() screen = pygame.display.set_mode((1000, 800)) menu = pygame_menu.Menu("frame", 400, 800)
frame = menu.add.frame_v(400, 2000, background_color=(50, 50, 50), padding=0, max_width=300, max_height=100) frame.set_title('My Frame App', title_font_color='white', padding_inner=(2, 5))
frame.pack(menu.add.dropselect( title='Is pygame-menu epic?', items=[('Yes', 0), ('Absolutely Yes', 1)], font_color='white', font_size=16, selection_option_font_size=20 )) for i in range(20): frame.pack(menu.add.button(i, font_color='white', button_id=f'b{i}')) menu.mainloop(screen)`
In normal Frame everything works fine !
I'm sorry, to which example with Frame are you referring to? I can't see it.
Sorry, there is no example with dropselect working correctly. I mean if you make the Frame without scrollbar (remove max_width and max_height) dropselect will work fine. There will be a menu scrollbar, but it doesn't break the dropselect. Just replace this: frame = menu.add.frame_v(400, 2000, background_color=(50, 50, 50), padding=0, max_width=300, max_height=100) by this: frame = menu.add.frame_v(400, 2000, background_color=(50, 50, 50), padding=0)
I'm a little bit late, but I finally fixed this issue in #429