30 |
|
|
31 |
Label(root, text="Lohn:").grid(row=0, sticky=E) |
Label(root, text="Lohn:").grid(row=0, sticky=E) |
32 |
self.lohn = Entry(root) |
self.lohn = Entry(root) |
33 |
|
self.lohn.bind("<Return>", self.NewInput) |
34 |
self.lohn.grid(row=0, column=1, sticky=W) |
self.lohn.grid(row=0, column=1, sticky=W) |
35 |
|
|
36 |
Label(root, text="Steuerklasse:").grid(row=1, sticky=E) |
Label(root, text="Steuerklasse:").grid(row=1, sticky=E) |
44 |
("V", "5"), |
("V", "5"), |
45 |
("VI", "6")]: |
("VI", "6")]: |
46 |
stklradio = Radiobutton(stklframe, text=text, value=val, |
stklradio = Radiobutton(stklframe, text=text, value=val, |
47 |
indicatoron=0, |
indicatoron=0, command=self.CalcOutput, |
48 |
variable=self.stkl) |
variable=self.stkl) |
49 |
if text == "I": |
if text == "I": |
50 |
stklradio.select() |
stklradio.select() |
64 |
self.calcbutton.grid(row=3, columnspan=4) |
self.calcbutton.grid(row=3, columnspan=4) |
65 |
|
|
66 |
self.CalcOutput() |
self.CalcOutput() |
67 |
|
|
68 |
|
def NewInput(self, event): |
69 |
|
self.CalcOutput() |
70 |
|
|
71 |
def ResetInput(self): |
def ResetInput(self): |
72 |
self.lohn.insert(0, "0") |
self.ResetInputLohn() |
73 |
|
|
74 |
|
def ResetInputLohn(self): |
75 |
|
self.lohn.delete(0, END) |
76 |
|
self.lohn.insert(0, "0") |
77 |
|
|
78 |
def InitCalc(self): |
def InitCalc(self): |
79 |
self.SetLohn(float(self.lohn.get())) |
try: |
80 |
|
self.SetLohn(float(self.lohn.get())) |
81 |
|
except: |
82 |
|
self.ResetInputLohn() |
83 |
|
|
84 |
self.SetSteuerklasse(int(self.stkl.get())) |
self.SetSteuerklasse(int(self.stkl.get())) |
85 |
|
|
86 |
def CalcOutput(self): |
def CalcOutput(self): |