-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Need to still utilize the progressbar, update docs, and clean code more but this is a good start. Please: DO NOT TOUCH. @im-coder-lg, please comment that you've read this.
- Loading branch information
Showing
2 changed files
with
143 additions
and
79 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import tkinter as tk | ||
|
||
|
||
class SampleApp(tk.Tk): | ||
def __init__(self, *args, **kwargs): | ||
tk.Tk.__init__(self, *args, **kwargs) | ||
|
||
self.frame = tk.Frame(self) | ||
self.frame.pack(side="top", fill="both", expand=True) | ||
|
||
self.label = tk.Label(self, text="Hello, world") | ||
self.label.pack(in_=self.frame) | ||
|
||
button1 = tk.Button(self, text="Click to hide label", command=self.hide_label) | ||
button1.pack() | ||
|
||
button2 = tk.Button(self, text="Click to show label", command=self.show_label) | ||
button2.pack() | ||
|
||
def show_label(self, *_): | ||
self.label.lift(self.frame) | ||
|
||
def hide_label(self, *_): | ||
self.label.lower(self.frame) | ||
|
||
|
||
if __name__ == "__main__": | ||
app = SampleApp() | ||
app.mainloop() |