2

I am trying to create a label for a string in TKinter. The string can be very long, and greater than the length of the label. Therefore, I wanted to implement a label which can scroll sideways, to show the entirety of the string.

How would you do this in TKinter?

svsav
  • 828
  • 3
  • 12
  • 29
  • 1
    http://stackoverflow.com/questions/7113937/how-do-you-create-a-labelframe-with-a-scrollbar-in-tkinter – Tadhg McDonald-Jensen Apr 30 '16 at 20:36
  • 1
    @TadhgMcDonald-Jensen: that question is completely unrelated. It deals with a frame full of labels, this question is about scrolling the text inside a single label. – Bryan Oakley May 02 '16 at 12:03
  • 1
    I wouldn't say "completely unrelated" @BryanOakley as having a frame 'full of' one label would allow for the desired result. Since, as you have stated, scrolling a label itself is unsupported. – Tadhg McDonald-Jensen May 02 '16 at 12:13

1 Answers1

4

You cannot scroll a label. I suggest using an entry widget. You can set the state to disabled to prevent users from using it like an entry widget, and you can change the borders to make it look like a label.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685