[英]fixing the toolbar i made with tkinter
i created a simple program with Tkinter but i have a small problem i have a graph and i am using .grid()
to place it and we bar1.get_tk_widget().grid(column=2, row=3, rowspan=20, sticky="nesw")
the result is: the first result我用 Tkinter 创建了一个简单的程序,但我有一个小问题我有一个图表,我正在使用
.grid()
来放置它,我们bar1.get_tk_widget().grid(column=2, row=3, rowspan=20, sticky="nesw")
结果是:第一个结果
but then when i am aligning it to the left with column 0 like that bar1.get_tk_widget().grid(column=0, row=3, rowspan=20, sticky="nesw")
the tool bar is centered as shown in figure 2 the second result但是当我将它与第 0 列对齐时,就像
bar1.get_tk_widget().grid(column=0, row=3, rowspan=20, sticky="nesw")
工具栏居中,如图2第二个结果
the question is how do i can fix the toolbar?问题是如何修复工具栏?
since I don't see your the rest of ur codes, here is my assumption:因为我没有看到你的代码的 rest,所以这是我的假设:
\\ put it on top of each other
toolbar.grid(row=0, column=0) \\ should always start with 0
graph.grid(row=1, column=0) \\ it doesn't matter how big the number you set to the row, since you have only 2 two images, you can have only 2 rows
\\ put it side by side
toolbar.grid(row=0, column=0)
graph.grid(row=0, column=1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.