tkinter 的 columnconfigure 方法?

编程入门 行业动态 更新时间:2024-10-24 09:28:01
本文介绍了tkinter 的 columnconfigure 方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

columnconfiguregrid_columnconfiguregrid.columnconfiguregrid columnconfigure 之间有什么区别吗?>tkinter?我有点困惑,因为这个包似乎有不同版本或不同的文档,例如这个 似乎是某种命令行/shell 语言,没有与 Python 的关系.

Are there any differences between columnconfigure, grid_columnconfigure, grid.columnconfigure, and grid columnconfigure in tkinter? I'm getting a little confused as there seems to be either different versions of this package or different documentations floating around, e.g. this one that appears to be some command line/shell language with no relation to Python.

推荐答案

来自 tkinter 的源代码(Python 3.9 it's line 1776):

From tkinter's source code (Python 3.9 it's line 1776):

class Misc:
    ...
    def grid_columnconfigure(self, index, cnf={}, **kw):
        """Configure column INDEX of a grid.

        Valid resources are minsize (minimum size of the column),
        weight (how much does additional space propagate to this column)
        and pad (how much space to let additionally)."""
        return self._grid_configure('columnconfigure', index, cnf, kw)

    columnconfigure = grid_columnconfigure

然后在第 2499 行:

then on line 2499:

class Grid:
    ...
    columnconfigure = grid_columnconfigure = Misc.grid_columnconfigure

这表明它们是完全相同的功能

It shows you that they are the same exact functions

grid columnconfigure 实际上不是 tkinter 而是 tcl.这是 tkinter 在内部使用的.你真的不需要知道.

The grid columnconfigure is actually not tkinter but tcl. It's what tkinter uses internally. You don't really need to know it.

这篇关于tkinter 的 columnconfigure 方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 06:12:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1390599.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法   tkinter   columnconfigure

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!