I know this question has been asked before (Underline text in a Label in Kivy?) and it is quite an old question but I was really wondering if there is a way to underline text in label's in Kivy? The only suggested solution I've found online is using a python script extended_markup.py. But this does not work and is riddled with problems due to updates in Kivy. I've tried messing around myself but underline even seems to be removed from markup in the kivy source code...even though the documentation talks about underline! Any help would be appreciated.
This functionality has been added in the development version of Kivy 1.9.2-dev. The instructions to update to the development version vary by platform: https://kivy.org/docs/installation/installation.html
You can set underline on a Label widget to underline the text:
Label:
text: 'underline this!'
underline: True
You can also use markup:
Label:
text: 'underline [u]this![/u]'
markup: True
However, underline is not supported by all text providers. In particular, the SDL2 text provider does support it while the pygame and PIL providers do not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With