What causes the Spinner and Dropdown Widgets to become 'hidden'?

12 views
Skip to first unread message

CorwinSTP

unread,
Oct 21, 2017, 5:41:38 PM10/21/17
to Kivy users support
Hello, I have run into an interesting problem with the Spinner Widget and was wondering if this has happened to anyone else. In my game, when a player ends the game and returns to the main menu, sometimes the Spinner Widgets background images will appear in a weird spot on the screen and their text appears in the bottom left of the screen. If you go to click the text in the bottom left it throws the 'cannot open a dropdown menu on a hidden widget' error. In the code it says this error will occur when the _get_root_window returns False. If you ignore this and go into a new game, all the text from Buttons also appear in the bottom left of the screen, while their background images remain in the correct location.

My build creates a Widget which I label as TopWidget globally. Then I have that widget create the Menu widget. When a player starts the game, the Menu Widget creates the Game widget. When they reset, I clear all widgets from Game and Menu and have the TopWidget remake the MenuWidget.

I have been trying to diagnose this issue for awhile now but with no luck. I currently have the Menu Widget setting the Spinner Widgets during init but creating the Spinners before build as a global widget or as a child of TopWidget still cause this issue. Any help would be appreciated!
Reply all
Reply to author
Forward
0 new messages