[英]How to get the attachment values when a widget has been attached to a grid
This will show all attributes and their values of an existing widget: (I got the idea from user285594 at this post )这将显示现有小部件的所有属性及其值:(我从 user285594 在这篇文章中得到了这个想法)
obj = [widget identifier]
for pspec in obj.props:
print(pspec.name)
name = pspec.name.replace('-', '_')
props = eval("button.props." + name)
print(props)
Unfortunately, I can't find the attachment values when the widget has been attached to a grid.不幸的是,当小部件附加到网格时,我找不到附件值。 Does anyone know how to do this?
有谁知道如何做到这一点?
The attachment and packing values are child properties , not properties, so you have to retrieve them with child_get_property()
.附件和包装值是子属性,而不是属性,因此您必须使用
child_get_property()
检索它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.