Exemplo n.º 1
0
 def _createTags(self, parent, row, col, padx, pady):
     Label(parent, text="Tags: ").grid(row=row,
                                       column=col,
                                       sticky='nw',
                                       padx=padx,
                                       pady=pady)
     col += 1
     tags = TextEntry(parent)
     tags.grid(row=row, column=col, sticky='nwe', padx=padx, pady=pady)
     tags.bind('<Control-s>', self._onCtrlS)
     ToolTip(tags, "Enter as many comma-separated tags as you want")
     return tags
Exemplo n.º 2
0
 def _createTitle(self, parent, row, col, padx, pady) -> TextEntry:
     Label(parent, text="Caption: ").grid(row=row,
                                          column=col,
                                          sticky='nw',
                                          padx=padx,
                                          pady=pady)
     col += 1
     title = TextEntry(parent)
     title.grid(row=row, column=col, sticky='nwe', padx=padx, pady=pady)
     title.bind('<Control-s>', self._onCtrlS)
     ToolTip(title,
             "This caption will be used to display this note in the tree")
     return title
Exemplo n.º 3
0
class VermieterGroup(AddressGroup):
    def __init__(self, parent):
        AddressGroup.__init__(self, parent)
        self.setGroupTitle('Vermieterdaten')
        self._teSteuernummer = None  #TextEntry

    def createGroupBoxContent(self) -> None:
        AddressGroup.createGroupBoxContent(self)
        box = self.getGroupBoxFrame()
        padx = pady = 3
        l = MyLabel(box,
                    text='Steuernummer:',
                    column=0,
                    row=5,
                    sticky='nw',
                    padx=padx,
                    pady=pady)
        self._teSteuernummer = TextEntry(box,
                                         column=1,
                                         row=5,
                                         sticky='nwe',
                                         padx=padx,
                                         pady=(pady, pady + 3))
        self._teSteuernummer.grid(columnspan=3)
Exemplo n.º 4
0
class AddressGroup(EditableGroup):
    def __init__(self, parent):
        EditableGroup.__init__(self, parent, 'Adressdaten')
        self._rbHerr = None
        self._rbFrau = None
        self._rbFirma = None
        self._teName = None
        self._teVorname = None
        self._teStrasse = None
        self._tePlz = None
        self._teOrt = None

    def createGroupBoxContent(self) -> None:
        box = self.getGroupBoxFrame()
        padx = pady = 3
        topy = 12
        row = 0

        v = IntVar()
        self._rbFrau = ttk.Radiobutton(box, text='Frau', variable=v, value=1)
        self._rbFrau.grid(column=1,
                          row=row,
                          sticky='nsw',
                          padx=padx,
                          pady=(topy, pady))

        self._rbHerr = ttk.Radiobutton(box, text='Herr', variable=v, value=2)
        self._rbHerr.grid(column=2,
                          row=row,
                          sticky='nsw',
                          padx=padx,
                          pady=(topy, pady))

        self._rbFirma = ttk.Radiobutton(box, text='Firma', variable=v, value=3)
        self._rbFirma.grid(column=3,
                           row=row,
                           sticky='nsw',
                           padx=padx,
                           pady=(topy, pady))

        row += 1
        l = MyLabel(box,
                    text='Name:',
                    column=0,
                    row=row,
                    sticky='ne',
                    padx=padx,
                    pady=pady,
                    align='e')
        self._teName = TextEntry(box,
                                 column=1,
                                 row=row,
                                 sticky='nwe',
                                 padx=padx,
                                 pady=pady)
        self._teName.grid(columnspan=3)

        row += 1
        MyLabel(box,
                text='ggf. Vorname:',
                column=0,
                row=row,
                sticky='ne',
                padx=padx,
                pady=pady,
                align='e')
        self._teVorname = TextEntry(box,
                                    column=1,
                                    row=row,
                                    sticky='nwe',
                                    padx=padx,
                                    pady=pady)
        self._teVorname.grid(columnspan=3)

        row += 1
        l = MyLabel(box,
                    text='Straße:',
                    column=0,
                    row=row,
                    sticky='ne',
                    padx=padx,
                    pady=pady,
                    align='e')
        self._teStrasse = TextEntry(box,
                                    column=1,
                                    row=row,
                                    sticky='nwe',
                                    padx=padx,
                                    pady=pady)
        self._teStrasse.setWidth(35)
        self._teStrasse.grid(columnspan=3)

        row += 1  #PLZ/Ort
        l = MyLabel(box,
                    text='PLZ / Ort:',
                    column=0,
                    row=row,
                    sticky='ne',
                    padx=padx,
                    pady=pady,
                    align='e')
        f = ttk.Frame(box)
        self._tePlz = TextEntry(f,
                                column=0,
                                row=0,
                                sticky='nw',
                                padx=padx,
                                pady=pady)
        self._tePlz.setWidth(6)
        self._teOrt = TextEntry(f,
                                column=1,
                                row=0,
                                sticky='ne',
                                padx=padx,
                                pady=pady)
        f.grid(column=1, columnspan=3, row=row, sticky='nswe', padx=0, pady=0)
        self._teOrt.setWidth(30)
        #self._teOrt.grid(columnspan=3)

    def getData(self) -> XAdresse:
        pass
Exemplo n.º 5
0
    def _createMieterFrame(self, row, xmargins: int, topmargin: int,
                           bottommargin: int):
        padx = xmargins
        pady = (topmargin, bottommargin)
        lf = ttk.Labelframe(self, text='Mieter', style='my.TLabelframe')
        lf.grid(column=0, row=row, sticky='nswe', padx=padx, pady=pady)

        padx = (5, 6)
        pady = (5, 5)
        col = row = 0
        ######### Anrede
        MyLabel(lf, 'Anrede:', col, row, 'nswe', 'w', padx, pady)
        col += 1
        cbo = MyCombobox(lf)
        cbo.setItems(('Frau', 'Herr'))
        cbo.setWidth(4)
        cbo.registerModifyCallback(self._onModified)
        cbo.grid(column=col, row=row, sticky='nsw', padx=padx, pady=pady)
        self._cboAnrede = cbo

        ######### Name
        col += 1
        MyLabel(lf, 'Name:', col, row, 'nswe', 'w', padx, pady)
        col += 1
        te = TextEntry(lf, col, row, 'nswe', padx, pady)
        te.registerModifyCallback(self._onModified)
        self._teName = te

        ######### Vorname
        col += 1
        MyLabel(lf, 'Vorname:', col, row, 'nswe', 'w', padx, pady)
        col += 1
        te = TextEntry(lf, col, row, 'nswe', padx, pady)
        te.registerModifyCallback(self._onModified)
        self._teVorname = te

        ######### Geburtstag
        row += 1
        col = 0
        MyLabel(lf, 'Geburtstag:', col, row, 'nswe', 'w', padx, pady)
        col += 1
        te = TextEntry(lf, col, row, 'nswe', padx, pady)
        te.registerModifyCallback(self._onModified)
        self._teGeboren_am = te

        ######### Perso-Nr.
        col += 1
        MyLabel(lf, 'Personalausweis-Nr.:', col, row, 'nswe', 'w', padx, pady)
        col += 1
        te = TextEntry(lf, col, row, 'nswe', padx, pady)
        te.grid(columnspan=2)
        te.registerModifyCallback(self._onModified)
        self._teAusweisId = te

        ######## Telefon
        row += 1
        col = 0
        MyLabel(lf, 'Telefon:', col, row, 'nswe', 'w', padx, pady)
        col += 1
        te = TextEntry(lf, col, row, 'nswe', padx, pady)
        te.registerModifyCallback(self._onModified)
        self._teTelefon = te

        ######### mailto
        col += 1
        MyLabel(lf, 'Mailto:', col, row, 'nswe', 'w', padx, pady)
        col += 1
        te = TextEntry(lf, col, row, 'nswe', padx, pady)
        te.grid(columnspan=2)
        te.registerModifyCallback(self._onModified)
        self._teMailto = te

        ######## Bankverbindung
        row += 1
        col = 0
        MyLabel(lf, 'IBAN:', col, row, 'nswe', 'w', padx, pady)
        col += 1
        te = TextEntry(lf, col, row, 'nswe', padx, pady)
        te.registerModifyCallback(self._onModified)
        te.grid(columnspan=2)
        self._teIban = te
Exemplo n.º 6
0
    def _createAllgemeinFrame(self, row, padx, pady):
        lf = ttk.Labelframe(self,
                            text='Allgemeine Daten',
                            style='my.TLabelframe')
        lf.grid(column=0,
                row=row,
                sticky='nswe',
                padx=padx,
                pady=(pady + 8, pady))

        ### Combo und Label für Etage
        col = 0
        cbo = MyCombobox(lf)
        cbo.setItems((1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))
        cbo.setWidth(3)
        cbo.registerModifyCallback(self._onModified)
        cbo.grid(column=col, row=0, sticky='nswe', padx=padx, pady=pady)

        col += 1
        self._cboEtage = cbo
        MyLabel(lf, '. Etage', col, 0, 'nswe', 'w', (0, padx), pady)

        #### Entry und Label für qm
        col += 1
        ie = IntEntry(lf)
        ie.setWidth(3)
        ie.registerModifyCallback(self._onModified)
        ie.grid(column=col, row=0, sticky='nswe', padx=padx, pady=pady)
        self._ieQm = ie

        col += 1
        lbl = MyLabel(lf, 'qm', col, 0, 'nswe', 'w', (0, padx), pady)

        ### Combo und Label für Zimmer
        col += 1
        cbo = MyCombobox(lf)
        cbo.setItems((1, 1.5, 2, 2.5, 3, 3.5, 4, 5))
        cbo.setIndex(2)
        cbo.setWidth(3)
        cbo.registerModifyCallback(self._onModified)
        cbo.grid(column=col, row=0, sticky='nswe', padx=padx, pady=pady)
        self._cboZimmer = cbo

        col += 1
        MyLabel(lf, 'Zimmer', col, 0, 'nswe', 'w', (0, padx), pady)

        ### Entry und Label für Anteile
        col += 1
        ie = IntEntry(lf)
        ie.setWidth(3)
        ie.grid(column=col, row=0, sticky='nswe', padx=padx, pady=pady)
        ie.registerModifyCallback(self._onModified)
        self._ieAnteil = ie

        col += 1
        MyLabel(lf, 'Anteile am Gesamtobjekt', col, 0, 'nswe', 'w', (0, padx),
                pady)

        ### neue Zeile
        ### Checkbutton für Aufzug
        col = 0
        cb = ttk.Checkbutton(lf,
                             text='Aufzug im Haus',
                             variable=self._ivarAufzug)
        cb.grid(column=col,
                row=1,
                columnspan=2,
                sticky='nswe',
                padx=padx,
                pady=pady)
        self._cbAufzug = cb

        ### neue Zeile
        ### Label und Entry für IBAN
        col = 0
        lbl = MyLabel(lf, 'IBAN der WEG ', 0, 2, 'nswe', 'w', padx, pady)
        lbl.grid(columnspan=2)

        col += 2
        te = TextEntry(lf, col, 2, 'nswe', (padx), pady)
        te.registerModifyCallback(self._onModified)
        te.grid(columnspan=5)
        self._teIbanWEG = te