tkintertools.standard.widgets¶
字数 1870 个 代码 455 行 阅读时间 12 分钟 访问量
All standard Widget
classes
🟢Button
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgettext
: text of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikejustify
: justify mode of the textanchor
: anchor of the textcommand
: a function that is triggered when the button is pressedimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟢CheckButton
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetlength
: length of the widgetdefault
: default state of the widgetcommand
: a function that is triggered when the state of check button is onimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡get
¶
method
public
🟡set
¶
method
public
🟢ComboBox
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikealign
: align mode of the textdefault
: default value of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟢HighlightButton
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgettext
: text of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikejustify
: justify mode of the textanchor
: anchor of the textcommand
: a function that is triggered when the hightlight button is pressedimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟢IconButton
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgettext
: text of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikejustify
: justify mode of the textanchor
: anchor of the textcommand
: a function that is triggered when the button is pressedimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟢Image
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgetimage
: image of the widgetanchor
: anchor of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡get
¶
method
public
🟡set
¶
method
public
🟢InputBox
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikealign
: align mode of the textshow
: display a value that obscures the original contentplaceholder
: a placeholder for the promptlimit
: limit on the number of charactersimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡append
¶
method
public
🟡clear
¶
method
public
🟡delete
¶
method
public
🟡get
¶
method
public
🟡set
¶
method
public
🟢Label
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgettext
: text of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikejustify
: justify mode of the textanchor
: anchor of the textimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟢OptionButton
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikedefault
: default value of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡append
¶
method
public
🟡get
¶
method
public
🟡pop_menu
¶
method
public
🟡remove
¶
method
public
🟡set
¶
method
public
🟢ProgressBar
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgetdefault
: default value of the widgetcommand
: a function that is triggered when the progress of progress bar is 100%image
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡get
¶
method
public
🟡set
¶
method
public
🟢RadioButton
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetlength
: length of the widgetdefault
: default state of the widgetcommand
: a function that is triggered when the state of radio button is onimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡get
¶
method
public
🟡set
¶
method
public
🟢SegmentedButton
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgettext
: text of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikejustify
: justify mode of the textanchor
: anchor of the textdefault
: default value of the widgetcommand
: a function that is triggered when the button is pressedimages
: image of the widgetlayout
: layout mode of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡get
¶
method
public
Get the index of the child toggle button with a value of True. If not, None is returned.
🟡set
¶
method
public
🟢Slider
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgetdefault
: default value of the widgetcommand
: a function that is triggered when the button is pressedname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡get
¶
method
public
🟡set
¶
method
public
🟢SpinBox
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikealign
: align mode of the textshow
: display a value that obscures the original contentplaceholder
: a placeholder for the promptlimit
: limit on the number of characterscommand
: a function that is triggered when the button is pressedimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡append
¶
method
public
🟡change
¶
method
public
🟡clear
¶
method
public
🟡delete
¶
method
public
🟡get
¶
method
public
🟡set
¶
method
public
🟢Switch
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetlength
: length of the widgetdefault
: default value of the widgetcommand
: a function that is triggered when the switch is changedimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡get
¶
method
public
🟡set
¶
method
public
🟢Text
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgettext
: text of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikejustify
: justify mode of the textanchor
: anchor of the textname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡get
¶
method
public
🟡set
¶
method
public
🟢ToggleButton
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgettext
: text of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikejustify
: justify mode of the textanchor
: anchor of the textdefault
: default state of the widgetcommand
: a function that is triggered when the state of check button is onimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation
🟡get
¶
method
public
🟡set
¶
method
public
🟢UnderlineButton
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgettext
: text of the widgetfamily
: font familyfontsize
: font sizeweight
: weight of the textslant
: slant of the textunderline
: whether the text is underlineoverstrike
: whether the text is overstrikejustify
: justify mode of the textanchor
: anchor of the textcommand
: a function that is triggered when the underline button is pressedimage
: image of the widgetname
: name of the widgetthrough
: wether detect another widget under the widgetanimation
: wether enable animation