tkinter - Python multiple treeviews -
I am trying to create a GUI which is using a tinkanner. How can I get 3 trivews - the third on the bottom of two trees at the top and two trees at the top I got the two sides, I had assumed the side for the first value, but when I use the bottom for the third it comes in the middle of the last two trees.
container = ttk.frame () container.pac
thanks for help
(<== ================================
When you insert upper-left and upper-right tree view widgets, then pack them with side = LEFT
so that they are packed with left
to to the right < / Code>. (You can use
side = right
if you can pack a right first).
In addition, pack up from top to bottom (< Packed with Code> Side = Top Or switch to clear side
)
from Tikenetr import * Import Titik # Python 3.x #from tkinter import * # of Tnkintr import TTK root = TC (in) Upri_kanten = Frame (root) Upri_kantiarkpak () Bayan_try = Titik. success (Upri_kanten) Bayan_try. peak (side = left) Shi_try = Titik. Riwuwu (upper container) Shi_trykpak side = lEFT) lower_tree = ttk.Treeview (root ) Lower_tree.pack () root.mainloop ()
UPDATE
The updated version will change the size of the upper / lower area.
from Tkinter import * Import Ttk # Python 3 # from Tkinter import * #from tkinter import ttk root = Tk () pane = Emerald Wide (orient = VERTICAL) pane.pack (in) upper_container = Frame (panel) Upri_kantiayr. pack () left_tree = ttk.Treeview (Upri_kantenr) Left_treekpack (side = LEFT) right_tree = ttk.Treeview (upper_contai Ner) Shi_trykpak (side = LEFT) lower_tree = ttk.Treeview ( Pane) lower_tree.pack () pane.add (upper_container) pane.add (lower_tree) root.mainloop ()
Comments
Post a Comment