-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0e1718
commit 7221b5f
Showing
3 changed files
with
68 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import tkinter as tk | ||
from tkinter import messagebox | ||
|
||
def startCalc(): | ||
if v.get() == 1: | ||
unit = " kg" | ||
elif v.get() == 2: | ||
unit = " lbs" | ||
else: | ||
unit = "" | ||
messagebox.showinfo("Result", "Your weight is "+entry.get()+unit+"!") | ||
|
||
window = tk.Tk() | ||
window.title("Weight Calculator Tool") | ||
window.resizable(False,False) | ||
|
||
fr_top = tk.Frame(window) | ||
fr_top.grid(row=0, column=0, pady=5) | ||
|
||
fr_bot = tk.Frame(window) | ||
fr_bot.grid(row=1, column=0, sticky="e", pady=(0,5)) | ||
|
||
label = tk.Label(master=fr_top, text="Input your weight: ") | ||
label.grid(row=0, column=0, padx=(5,0)) | ||
|
||
entry = tk.Entry(master=fr_top, width=10) | ||
entry.grid(row=0, column=1, padx=(0,5)) | ||
|
||
v = tk.IntVar() | ||
|
||
rButton1 = tk.Radiobutton(master=fr_top, text="kg", variable=v, value="1") | ||
rButton1.grid(row=0, column=2) | ||
|
||
rButton2 = tk.Radiobutton(master=fr_top, text="lbs", variable=v, value="2") | ||
rButton2.grid(row=0, column=3) | ||
|
||
startButton = tk.Button(master=fr_bot, text="Start", width=10, command=startCalc) | ||
startButton.pack(padx=(0,5)) | ||
|
||
window.mainloop() |
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,28 @@ | ||
VSVersionInfo( | ||
ffi=FixedFileInfo( | ||
filevers=(1, 0, 0, 0), | ||
prodvers=(1, 0, 0, 0), | ||
mask=0x3f, | ||
flags=0x0, | ||
OS=0x40004, | ||
fileType=0x1, | ||
subtype=0x0, | ||
date=(0, 0) | ||
), | ||
kids=[ | ||
StringFileInfo( | ||
[ | ||
StringTable( | ||
u'040904B0', | ||
[StringStruct(u'CompanyName', u'pixelatedjelly'), | ||
StringStruct(u'FileDescription', u'Weight Calculator Tool'), | ||
StringStruct(u'FileVersion', u'1.0'), | ||
StringStruct(u'InternalName', u'Weight Calculator Tool'), | ||
StringStruct(u'LegalCopyright', u'\xa9 pixelatedjelly. All rights reserved.'), | ||
StringStruct(u'OriginalFilename', u'WeightCalcTool.exe'), | ||
StringStruct(u'ProductName', u'Weight Calculator Tool'), | ||
StringStruct(u'ProductVersion', u'1.0')]) | ||
]), | ||
VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) | ||
] | ||
) |