本文整理汇总了Python中Tkinter.Checkbutton.fieldname方法的典型用法代码示例。如果您正苦于以下问题:Python Checkbutton.fieldname方法的具体用法?Python Checkbutton.fieldname怎么用?Python Checkbutton.fieldname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tkinter.Checkbutton
的用法示例。
在下文中一共展示了Checkbutton.fieldname方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Label
# 需要导入模块: from Tkinter import Checkbutton [as 别名]
# 或者: from Tkinter.Checkbutton import fieldname [as 别名]
form.hidden_input["hidden_var1"] = "value1"
form.hidden_input["hidden_var2"] = "value2"
Label(form, text="Entry:").grid(row=0,column=0, sticky=E, pady=(8,0))
# The fieldname attribute is necessary to provide data to action
entry = Entry(form)
entry.fieldname = "entry"
entry.grid(row=1,column=1, sticky =E+W)
Label(form, text="Checkbuttons:").grid(row=2,column=0, sticky=E, pady=(8,0))
column = Frame(form)
column.grid(row=3,column=1, sticky =E+W)
checkbutton0 = Checkbutton(column, text="Option 0")
checkbutton0.fieldname = "checkbutton0"
checkbutton0.pack(side=LEFT)
checkbutton1 = Checkbutton(column, text="Option 1")
checkbutton1.fieldname = "checkbutton1"
checkbutton1.pack(side=LEFT)
checkbutton2 = Checkbutton(column, text="Option 2")
checkbutton2.fieldname = "checkbutton2"
checkbutton2.pack(side=LEFT)
Label(form, text="Radiobuttons:").grid(row=4,column=0, sticky=E, pady=(8,0))
column = Frame(form)
column.grid(row=5,column=1, sticky =E+W)
# All radiobuttons require a variable