Very long texts in Spinner list

10 views
Skip to first unread message

Radosław Głębicki

unread,
Apr 28, 2026, 2:47:58 PMApr 28
to Kivy users support
Hi.
There is Spinner with long paths. Paths are cut to fit space of list in Spinner.
Original paths in full length are hold in python list.
1 question:
how to inform user witch path is choosing if end of text in Spinner element is that same
/very/long/path/to/the/file
is cut (by my function):
..ath/to/the/file                                            # to fit 200 (expl. lower)
/another/very/long/path/to/the/file
is cut (by my function):
..ath/to/the/file
???
I found solution:
I am looping over elements in:
Spinner._dropdown.children[0].children
Those are buttons of Spinner list. I adding index to list with full paths
and also adding .bind on_release to those elements.
I got Kivy [WARNING]:

[WARNING] [Factory     ] Ignored class "myBuildDropdown" re-declaration. Current -  module: None, cls: <class 'kivy.factory.myBuildDropdown'>, baseclass: DropDown, fil
ename: None. Ignored -  module: None, cls: None, baseclass: DropDown, filename: None.

Declaration
Builder.load_string(f"""<myBuildDropdown@DropDown>:
auto_width: False
width: 200""") # width of Spinner elms in list still not always is enough

here is question 2:
This Warning is important and eventually how to rid of it?

I hope my explanation is clear.

Radek Glebicki

ElliotG

unread,
Apr 28, 2026, 9:23:28 PMApr 28
to Kivy users support
The warning suggests you are defining the class myBuildDropdown in both KV and Python.  If you are defining the class in Python, you can remove the @DropDown from KV rule, and the warning will go away.
Reply all
Reply to author
Forward
0 new messages