-
-
Save JeffersGlass/e0f3e397ba756ec6cad8274272932f3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
class App(tk.Frame): | |
def __init__(self, master): | |
super().__init__(master) | |
self.makeLabels() | |
self.config(bg="#FFCCCC", width=300, height = 300) | |
self.pack() | |
#self.pack(fill=tk.BOTH, expand=1) | |
def makeLabels(self): | |
self.firstLabel = tk.Label(self, text="I'm a label!", bg="#CCFFCC") | |
self.firstLabel.pack() | |
#self.firstLabel.pack(fill=tk.BOTH, expand=1) | |
self.secondLabel = tk.Label(self, text="Me too!", bg="#CCCCFF") | |
self.secondLabel.pack() | |
#self.secondLabel.pack(fill=tk.X) | |
if __name__ == '__main__': | |
myApp = App(tk.Tk()) | |
myApp.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment