Overlapping widgets when I open a dropdown

36 views
Skip to first unread message

GENÍS LLOSES MIRÓ

unread,
Nov 18, 2022, 12:00:54 PM11/18/22
to Kivy users support
Hello everyone and thanks in advance,

I am having problems working with the DropDown widget. My intention is to have a list of Buttons and when you click on each one of them a DropDown menu is displayed. The main problem I have is that when the DropDown is displayed, it does it overlapping with the  other Buttons. I would like that at the moment that the DropDown is deployed the other Buttons move down so that they do not overlap. Is it possible to do this?

I leave captures of the code.
I'm open to hear improvements in my code :), I'm very new with kivy.

Thanks!!!!


Screenshot 2022-11-18 at 17.58.09.png
Screenshot 2022-11-18 at 17.57.31.png
Screenshot 2022-11-18 at 17.58.21.png
Screenshot 2022-11-18 at 17.57.15.png

Elliot Garbus

unread,
Nov 18, 2022, 5:56:35 PM11/18/22
to kivy-...@googlegroups.com

Please share a minimal, runnable example of your code that highlights the issue.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/597b8441-ace1-4e35-a032-3722cef8ae70n%40googlegroups.com.

 

Elliot Garbus

unread,
Nov 18, 2022, 6:06:02 PM11/18/22
to kivy-...@googlegroups.com

One of this issues I see:

 

In the dropdown() method, you are creating buttons and setting the height, and NOT turning off the size_hint.  If you want to set the height you must set size_hint_y=None or the size will be ignored.

 

Another option to consider is using the kivy Spinner() rather than dropdown.  You can customize spinner by changing the option_cls attribute.

See: https://kivy.org/doc/stable/api-kivy.uix.spinner.html?highlight=spinner#module-kivy.uix.spinner

 

 

From: GENÍS LLOSES MIRÓ
Sent: Friday, November 18, 2022 10:01 AM
To: Kivy users support
Subject: [kivy-users] Overlapping widgets when I open a dropdown

 

Hello everyone and thanks in advance,

--

Reply all
Reply to author
Forward
0 new messages