Beispiel #1
0
    def __init__(self, master, resizer=True, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        self.master = master  # root or toplevel

        self.sizer = Sizer(self.master)

        self.grid_columnconfigure(0, weight=1)
        # With custom window border, you can't use the otherwise
        #   desirable option bd=2, relief='sunken' for a border on statusbar
        #   because edge grabber for resizing is below statusbar
        #   so border looks wrong there. Instead put a Separator
        #   above the statusbar frame.
        # relief = Frame(self, bd=2, relief='sunken')
        relief = Frame(self, bd=0)
        relief.grid(column=0, row=0, sticky='news')
        relief.grid_columnconfigure(0, weight=1)

        self.status_label = LabelStatusbar(relief, cursor='arrow', anchor='w')
        self.tooltip_label = LabelStatusbar(relief,
                                            bd=2,
                                            relief='sunken',
                                            anchor='e')

        if resizer is True:
            self.sizer.place(relx=1.0, x=-3, rely=1.0, anchor='se')
            self.sizer.bind('<Button-1>', self.sizer.get_pos)
        self.status_label.grid(column=0, row=0, sticky='w')
Beispiel #2
0
    def __init__(self, master, view, treebard, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        self.master = master  # the main canvas (instance of Border class)
        self.view = view
        self.treebard = treebard
        # print('19 self.view is', self.view)
        self.make_widgets()
Beispiel #3
0
    def __init__(self, master, command, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        self.ent = Entry(self, width=36)
        spacer = Label(self, width=3)

        ok_butt = Button(self, text='OK', command=command)

        cancel_butt = Button(self, text='CANCEL', command=self.remove_edit_row)

        spacer.grid(column=0, row=0)
        self.ent.grid(column=1, row=0, padx=3, pady=3)
        ok_butt.grid(column=2, row=0, padx=6, pady=6)
        cancel_butt.grid(column=3, row=0, padx=6, pady=6)
Beispiel #4
0
    def __init__(self, parent, tabbook, root, *args, **kwargs):
        Frame.__init__(self, parent, *args, **kwargs)

        self.parent = parent
        self.tabbook = tabbook
        self.root = root

        self.old_col = 0
        self.parent.columnconfigure(0, weight=1)
        self.parent.rowconfigure(0, weight=1)

        self.root.bind('<Return>', self.apply_scheme)

        self.r_col = {}

        self.make_widgets()
Beispiel #5
0
    def __init__(self, parent, autofill, root, *args, **kwargs):
        Frame.__init__(self, parent, *args, **kwargs)

        self.parent = parent
        self.root = root
        self.autofill = autofill

        self.config(padx=24, pady=24)

        self.gender = 'unknown'

        self.new_person_id = None

        self.role_person_edited = False
        self.findings_roles_id = None

        self.rc_menu = RightClickMenu(self.root)
        self.make_widgets()
Beispiel #6
0
    def __init__(self, master, main, *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)
        self.master = master
        self.root = main.root
        self.canvas = main.canvas
        self.content = main
        self.canvas_docs = main.canvas_docs
        self.content_docs = main.content_docs
        self.all_fonts = font.families()

        conn = sqlite3.connect(current_file)
        cur = conn.cursor()
        cur.execute(select_font_scheme)
        font_scheme = cur.fetchall()
        cur.close()
        conn.close()
        self.font_scheme = list(font_scheme[0])
        self.make_widgets()
Beispiel #7
0
    def __init__(
            self, master, notebook, graphics_tab, root, 
            canvas,
            *args, **kwargs):
        Frame.__init__(self, master, *args, **kwargs)

        self.parent = master
        self.nbook = notebook
        self.t7 = graphics_tab
        self.root = root
        self.canvas = canvas
        self.counter = 0
        self.thumb_labels = []
        self.width_strings = []
        self.height_strings = []

        formats = make_formats_dict()

        self.current_person = get_current_person()[0]

        set_window_max_size(self.parent)
        self.filter_pix_data()
        self.make_widgets()