Tree_os. Tree_os.column("column10", width=100, minwidth=50, stretch=NO, anchor='center') what version of python are you using (python -V) in cmd -the last version(3.7) of python seems like it has bugs to color tags -if you are using python (3.7) just install python 3. It was introduced in Tk 8.5 and in Python it is provided by the tkinter.ttk standard module. Tree_os.column("column9", width=50, minwidth=20, stretch=NO, anchor='center') Treeview in Tk (tkinter) The tree view (or hierarchical list) is a UI widget that presents data in hierarchical form, although non-hierarchical data is also supported. Tree_os.column("column8", width=55, minwidth=50, stretch=NO, anchor='center') Tree_os.column("column7", width=100, minwidth=50, stretch=NO, anchor='center') Tree_os.heading("#6", text="Valor Fechado") Tree_os.column("column6", width=100, minwidth=55, stretch=NO, anchor='center') Tree_os.column("column5", width=55, minwidth=50, stretch=NO, anchor='center') Tree_os.column("column4", width=50, minwidth=20, stretch=NO, anchor='center') Tree_os.column("column3", width=200, minwidth=50, stretch=NO, anchor='center') Tree_os.column("column2", width=200, minwidth=50, stretch=NO, anchor='center') The show option accepts one of the following values: 'tree' shows the column 0. The show'heading' hides the first column (column 0) of the Treeview. ![]() ![]() Tree_os.column("column1", width=80, minwidth=50, stretch=NO, anchor='center') Fourth, create a Tkinter’s Treeview widget: tree ttk.Treeview (root, columnscolumns, show 'headings') In this code, we passed the columns to the columns option. Janela_os.grid_rowconfigure(0, weight=12) I want my treeview to fully fit the geometry size of my window have defined for my GUI but the display doesn't cover the entire window been display in the middle. Hsb_os.grid(column=1, row=1, sticky='ew') Vsb_os.grid(column=1, row=0, sticky='ns') ![]() Tree_os.grid(column=0, row=0, sticky='nsew') Tree_os.configure(yscrollcommand=vsb_os.set, xscrollcommand=hsb_os.set, height=200) Hsb_os = ttk.Scrollbar(janela_os, orient="horizontal", command=tree_os.xview) Vsb_os = ttk.Scrollbar(janela_os, orient="vertical", command=tree_os.yview) Style_os.configure("Treeview.Heading", font=('Ivy bold', 10), background="lightblue", foreground=co4, relief="flat", ANCHOR="NW") Tree_os = ttk.Treeview(janela_os,column=("column1", "column2", "column3", "column4", "column5", "column6", "column7", "column8", "column9", "column10"), selectmode="extended", show="headings")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |