/[lohnrechner]/trunk/lohnrechner2006.py
ViewVC logotype

Diff of /trunk/lohnrechner2006.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8 by wilde, Thu Jan 13 10:01:01 2005 UTC revision 9 by wilde, Thu Jan 13 10:32:30 2005 UTC
# Line 30  class Lohnrechner(LST2005.LStRechner2005 Line 30  class Lohnrechner(LST2005.LStRechner2005
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)
# Line 43  class Lohnrechner(LST2005.LStRechner2005 Line 44  class Lohnrechner(LST2005.LStRechner2005
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()
# Line 63  class Lohnrechner(LST2005.LStRechner2005 Line 64  class Lohnrechner(LST2005.LStRechner2005
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):

Legend:
Removed from v.8  
changed lines
  Added in v.9

root@scm.wald.intevation.org
ViewVC Help
Powered by ViewVC 1.1.26