This code works great on Windows. On Mac OS X, it shows only a few in the button, and everything that passes after the new line is destroyed. I am running Python 2.6.5 on Mac.
import Tkinter as tk
class App:
def __init__(self, master):
self.a_button = tk.Button(master, text="Multiple\nLines\nOf Text")
self.a_button.pack()
ROOT = tk.Tk()
APP = App(ROOT)
ROOT.mainloop()
source
share