Reputation: 16153
I'd like to have a label in a kivy app scroll horizontally with a fixed vertical size rather than vertically with wrapping. Imagine something like the marquee tag in the bad old days.
Eventually I'd like to have this automatically scroll left to right (and back) to show a string that is too long to display.
All of the scrollable label examples I've seen are vertically scrolling and two days of working on it has gotten me nowhere.
Edit: Note: I am working on Windows for the time being. The target will eventually be android and iphone
Here's an example of the UI I want...
The track name at the bottom should be the height of one line of the text and scroll horizontally.
Upvotes: 5
Views: 1444
Reputation: 12107
The same way of doing the vertical scroll:
ScrollView:
Label:
text: 'hellooooooooooooooooooooosdsadas'
text_size: None, self.height # Set the text wrap box height
size_hint_x: None
width: self.texture_size[0] # Set the Label width to the text width
Result will be:
Upvotes: 3