def __init__(self, *args, **kwargs): # Only a single stack frame can be selected at a time. kwargs['selectmode'] = 'browse' Treeview.__init__(self, *args, **kwargs) self.locals = self.insert( '', 'end', ':builtins:', text='builtins', open=False, ) self.globals = self.insert( '', 'end', ':globals:', text='globals', open=False, ) self.locals = self.insert( '', 'end', ':locals:', text='locals', open=True, ) self['columns'] = ('value',) self.column('#0', width=150, anchor='w') self.column('value', width=200, anchor='w') self.heading('#0', text='Name') self.heading('value', text='Value')
def __init__(self, parent, model): Treeview.__init__(self, parent, columns=["COL0", "COL1"], selectmode="browse") self.heading(0, text="Number") self.heading(1, text="Text") self["show"] = "headings" self.counter = 0 self.bind("<<TreeviewSelect>>", self.on_select) self.model = model self.model.add_listener(self.on_model)
def __init__(self, gesture, master=None, yscrollcommand=None): self.gesture = gesture Treeview.__init__(self, master=master, columns=self.generate_columns(), yscrollcommand=yscrollcommand) self.setup_column_headers() self.populate_list() self.pack(fill="both", expand="yes")
def __init__(self, *args, **kwargs): # Only a single stack frame can be selected at a time. kwargs['selectmode'] = 'browse' self.normalizer = kwargs.pop('normalizer') Treeview.__init__(self, *args, **kwargs) self['columns'] = ('line',) self.column('line', width=50, anchor='center') self.heading('#0', text='File') self.heading('line', text='Line')
def __init__(self, parent, timeEntries): columns = ("project", "start", "stop", "duration") Treeview.__init__(self, parent, columns=columns) for col in columns: self.heading(col, text=col, command=lambda: self.sort_column(col, False)) [self.insertTimeEntry(e) for e in timeEntries.values()] self.sort_column("start", True)
def __init__(self, *args, **kwargs): # Only a single stack frame can be selected at a time. kwargs['selectmode'] = 'browse' self.normalizer = kwargs.pop('normalizer') Treeview.__init__(self, *args, **kwargs) # self['columns'] = ('line',) # self.column('line', width=100, anchor='center') self.heading('#0', text='File') # self.heading('line', text='Line') # Set up styles for line numbers self.tag_configure('enabled', foreground='red') self.tag_configure('disabled', foreground='gray') self.tag_configure('ignored', foreground='green') self.tag_configure('temporary', foreground='pink')
def __init__(self, root, frame, num, logit, all_values, list_styles_names): Treeview.__init__(self, root) self.root = root self.num = num self.frame = frame self.name = "MOXA-%s" % str(self.num) self.tree = Treeview(frame, style=list_styles_names[num]) self.tree["columns"] = ("one", "two", "three") self.tree.heading("#0", text="") self.tree.column("#0", minwidth=0, width=5, stretch=NO) self.tree.heading("one", text="Port") self.tree.column("one", minwidth=0, width=30, stretch=NO) self.tree.column("two", minwidth=0, width=name_column, stretch=NO) self.tree.heading("three", text="State") self.tree.column("three", minwidth=0, width=state_column, stretch=YES) self.tree['height'] = 32 self.tree.tag_configure('green', background='gray7', foreground='green2') self.tree.tag_configure('red', background='gray7', foreground='tomato2') self.tree.tag_configure('blue', background='gray7', foreground='RoyalBlue') self.tree.tag_configure('yellow', background='gray7', foreground='yellow') self.tree.tag_configure('ready', background='gray7', foreground='white') self.tree.tag_configure( 'focus', background='yellow', ) self.tree.bind("<Motion>", self.mycallback) self.last_focus = None self.tree.pack(side=LEFT) self.logit = logit self.moxa = all_values[self.num][0] self.wraplength = 180 for key in self.moxa.keys(): self.tree.insert("", "end", values=(str(key), self.moxa[key], "<><><>"), tags=("green", ))
def __init__(self, data, master=None): Treeview.__init__(self, master=master, columns=["friendly_name", "status"]) self.data = data self.heading("#0", text="Port", anchor="w") self.column("#0", width = 150) self.heading("friendly_name", text="Name", anchor="w") self.column("friendly_name", width = 250) self.heading("status", text="Status", anchor="w") self.column("status", width = 100) self.bind("<<TreeviewSelect>>", self.update_status_button) midi.init() self.populate_list() self.pack(fill="both", expand="yes")
def __init__(self, parent): Treeview.__init__(self, parent, columns=["COL0", "COL1"]) self.heading(0, text="Number") self.heading(1, text="Text") self["show"] = "headings" self.counter = 0