Java知识分享网 - 轻松学习从此开始!    

Java知识分享网

Java1234官方群25:java1234官方群17
Java1234官方群25:838462530
        
SpringBoot+SpringSecurity+Vue+ElementPlus权限系统实战课程 震撼发布        

最新Java全栈就业实战课程(免费)

springcloud分布式电商秒杀实战课程

IDEA永久激活

66套java实战课程无套路领取

锋哥开始收Java学员啦!

Python学习路线图

锋哥开始收Java学员啦!
当前位置: 主页 > Java文档 > Java基础相关 >

tkinter官方手册 PDF 下载


分享到:
时间:2023-12-02 10:36来源:http://www.java1234.com 作者:转载  侵权举报
tkinter官方手册
失效链接处理
tkinter官方手册 PDF 下载


 
 
相关截图:


 
主要内容:



4.2. Other grid management methods
These grid-related methods are defined on all widgets:
w.grid_bbox(column=None, row=None, col2=None, row2=None)
Returns a 4-tuple describing the bounding box of some or all of the grid system in widget w. The
first two numbers returned are the and coordinates of the upper left corner of the area, and the
second two numbers are the width and height.
If you pass in column and row arguments, the returned bounding box describes the area of the cell
at that column and row. If you also pass in col2 and row2 arguments, the returned bounding box
describes the area of the grid from columns column to col2 inclusive, and from rows row to row2
inclusive.
For example, w.grid_bbox(0, 0, 1, 1) returns the bounding box of four cells, not one.
w.grid_forget()
This method makes widget disappear from the screen. It still exists, it just isn't visible. You can
use .grid() it to make it appear again, but it won't remember its grid options.
w.grid_info()
Returns a dictionarywhosekeys are w's option names,with the corresponding values of those options.
w.grid_location(xy)
Given a coordinates (xyrelative to the containing widget, this method returns a tuple (col,
rowdescribing what cell of w's grid system contains that screen coordinate.
w.grid_propagate()
Normally, all widgets propagate their dimensions, meaning that they adjust to fit the contents.
However, sometimes you want to force a widget to be a certain size, regardless of the size of its
contents. To do this, call w.grid_propagate(0) where is the widget whose size you want to
force.
w.grid_remove()
This method is like .grid_forget(), but its grid options are remembered, so if you .grid() it
again, it will use the same grid configuration options.
w.grid_size()
Returns a 2-tuple containing the number of columns and the number of rows, respectively, in w's
grid system.
w.grid_slaves(row=None, column=None)
Returns a list of the widgets managed by widget w. If no arguments are provided, you will get a
list of all the managed widgets. Use the row= argument to select only the widgets in one row, or
the column= argument to select only the widgets in one column.
4.3. Configuring column and row sizes
Unless you take certain measures, the width of a grid column inside a given widget will be equal to the
width of its widest cell, and the height of a grid row will be the height of its tallest cell. The sticky
attribute on a widget controls only where it will be placed if it doesn't completely fill the cell.
If you want to override this automatic sizing of columns and rows, use these methods on the parent
widget that contains the grid layout:
 
 
 
------分隔线----------------------------

锋哥公众号


锋哥微信


关注公众号
【Java资料站】
回复 666
获取 
66套java
从菜鸡到大神
项目实战课程

锋哥推荐