def _make_widgets(self):
     tree_container = ScrolledTree(self)
     tree_container.pack(expand='yes', fill='both')
     self.__tree = tree = tree_container.tree
     tree['columns'] = ['value', 'action']
     tree.heading('value', text='Value')
     tree.heading('action', text='Action')
Example #2
0
 def _make_widgets(self):
     tree_container = ScrolledTree(self)
     tree_container.pack(expand='yes', fill='both')
     self.__tree = tree = tree_container.tree
     tree['columns'] = ['app', 'id']
     tree.heading('app', text='App')
     tree.heading('id', text='ID')
     self._tree = tree
Example #3
0
 def _make_widgets(self):
     tree_container = ScrolledTree(self)
     tree_container.pack(expand='yes', fill='both')
     self.__tree = tree = tree_container.tree
     tree['columns'] = ['path', 'size']
     tree.heading('path', text='Path')
     tree.heading('size', text='Size')
     tree_container.on_item_double_click.add_function(
         self._on_item_doubleclick)
Example #4
0
 def __init__(self, *args, **kwargs):
     self.__tree_view = tree_view = ScrolledTree(*args, **kwargs)
     tree_view.tree["columns"] = ("ip", "host_name", "comments")
     tree_view.hide_icon_column()
     tree_view.heading("ip", text="IP")
     tree_view.heading("host_name", text="Host Name")
     tree_view.heading("comments", text="Comments")
Example #5
0
 def __init__(self, *args, **kwargs):
     super().__init__()
     self.__tree_view = tree_view = ScrolledTree(*args, **kwargs)
     tree_view.tree['columns'] = ('ratio', 'crc', 'path', 'type')
     tree_view.heading('ratio', text='Ratio')
     tree_view.heading('crc', text='CRC')
     tree_view.heading('path', text='Path')
     tree_view.heading('type', text='Type')
Example #6
0
 def __init__(self, *args, **kwargs):
     self.__tree_view = tree_view = ScrolledTree(*args, **kwargs)
     tree_view.tree['columns'] = ('visible', 'opacity', 'blend_mode')
     tree_view.heading('visible', text='Visible')
     tree_view.heading('opacity', text='Opacity')
     tree_view.heading('blend_mode', text='Blend Mode')
     tree_view.bind('<<TreeviewSelect>>', self._on_select_change)
     self.__layer_map = {}
     self.__psd_image = None
    def __init__(self, package_name, base_class, display_base_class=False):
        self.__package_name = package_name
        self.__base_class = base_class
        self.__display_base_class = display_base_class
        self.__window = window = Toplevel()
        window.title('Class Selector')
        self.__selected_class_name = ''
        self.__selected_module_name = ''

        self.__tree = tree = ScrolledTree(window)
        tree.pack()
        # If a module print something while being loaded, the stdout of this
        # script will be contaminated.
        # The dumb_stream prevents the contamination.
        with dumb_stream():
            classes = self.load_modules()
        for package in classes:
            packageNode = tree.insert('', 'end', text=package)
            for class_name in classes[package]:
                tree.insert(packageNode,
                            'end',
                            text=class_name,
                            values=package)

        button_frame = Frame(window)
        button_frame.pack()

        def _on_click(module_name, class_name):
            self.__selected_module_name = module_name
            self.__selected_class_name = class_name
            window.destroy()

        cancel_button = Button(button_frame,
                               text='Cancel',
                               command=lambda: _on_click('', ''))
        cancel_button.pack(side='right')
        ok_button = Button(button_frame,
                           text='OK',
                           command=lambda: _on_click(
                               tree.item(tree.selection(), 'values')[0],
                               tree.item(tree.selection(), 'text')))
        ok_button.pack(side='right')
Example #8
0
def show(dataframe):
    win = Toplevel()
    win.title("WaveSyn-DataFrameDisplay")
    query_entry = LabeledEntry(win)
    query_entry.pack(fill="x", expand="no")
    query_entry.label_text = "Query:"

    def query_func(event):
        if event.keysym == "Return":
            new_df = dataframe.query(query_entry.entry_text)
            show(new_df)

    query_entry.entry.bind("<Key>", query_func)
    st = ScrolledTree(win)
    st.pack(fill="both", expand="yes")
    st.load_dataframe(dataframe)