我正在通读 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/