Python Tkinter Frame 小部件选项(视觉和类)

标签 python widget tkinter

我正在通读 this Tkinter 文档和我遇到了 Frame widget 的这两个属性。

class= Default is Frame. (class/Class)

visual = No default value. (visual/Visual)

我试图在谷歌中查找,但我似乎无法找到如何使用这些属性。 这两个选项有什么用,什么时候用?

最佳答案

您可以在 Frame page 中找到这些选项的用途的 Tcl/Tk documentation .

-class, class, Class: Specifies a class for the window. This class will be used when querying the option database for the window's other options, and it will also be used later for other purposes such as bindings. The -class option may not be changed with the configure widget command.

-visual, visual, Visual: Specifies visual information for the new window in any of the forms accepted by Tk_GetVisual. If this option is not specified, the new window will use the same visual as its parent. The -visual option may not be modified with the configure widget command.

我认为您可以从这些描述中找到更具体的信息(如 examples of how to work with the option database)。

关于Python Tkinter Frame 小部件选项(视觉和类),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18435526/

相关文章:

python - 为 Python 应用程序设置 Mysql 容器的 Docker

java - GWT 单元表问题

android - 为什么小部件在重启后不起作用?

python - 如何显示解析后的 JSON 文本

python - 如何检查 RadioButton 是否已从另一个类中检查?

python - 使用paintEvent 在 QLabel 中绘画

python - 在 tf 函数内迭代 tf.Tensor 以生成基于 NamedTuple 的数据集项列表

yii - 我应该在哪里将自定义窗口小部件文件放在Yii框架中?

python - 当存在输入框时,不会显示按钮

Python 3.4.3 tkinter - 程序在声明 IntVar 或任何其他 tkinter 数据类型时卡住