maliang.standard.widgets¶
字数 2575 个 代码 590 行 阅读时间 16 分钟 访问量
源代码:maliang/standard/widgets.py
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 textcommand
: a function that is triggered when the button is pressedimage
: image of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟢CheckBox
¶
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 widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡get
¶
method
public
🟡set
¶
method
public
🟢ComboBox
¶
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 textdefault
: default value of the widgetcommand
: a function that is triggered when the button is pressedimage
: image of the widgetanchor
: anchor of the widgetalign
: align of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡_close_options
¶
method
protected
🟡_extra_bind
¶
method
protected
🟡_get_position
¶
method
protected
🟡_open_options
¶
method
protected
🟡get
¶
method
public
🟡set
¶
method
public
🟢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 textcommand
: a function that is triggered when the hightlight button is pressedimage
: image of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟢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 textcommand
: a function that is triggered when the button is pressedimage
: image of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟢Image
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgetimage
: image of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡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 characterslimit_width
: limit on the width of charactersimage
: image of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡append
¶
method
public
🟡clear
¶
method
public
🟡get
¶
method
public
🟡insert
¶
method
public
🟡pop
¶
method
public
🟡remove
¶
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 textimage
: image of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟢OptionButton
¶
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 textdefault
: default value of the widgetcommand
: a function that is triggered when the button is pressedimage
: image of the widgetanchor
: anchor of the widgetalign
: align of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡_close_options
¶
method
protected
🟡_extra_bind
¶
method
protected
🟡_get_position
¶
method
protected
🟡_open_options
¶
method
protected
🟡get
¶
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 widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡get
¶
method
public
🟡set
¶
method
public
🟢RadioBox
¶
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 widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡get
¶
method
public
🟡group
¶
method
public
radio_boxes
: other radio boxes
🟡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 textdefault
: default value of the widgetcommand
: a function that is triggered when the button is pressedimage
: image of the widgetlayout
: layout mode of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡get
¶
method
public
🟡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 pressedanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡get
¶
method
public
🟡set
¶
method
public
🟢SpinBox
¶
class
public
| Widget
master
: parent canvasposition
: position of the widgetsize
: size of the widgetformat_spec
: format of valuestep
: value of each changefamily
: 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 charactersdefault
: default value of the widgetcommand
: a function that is triggered when the button is pressedimage
: image of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡append
¶
method
public
🟡change
¶
method
public
🟡clear
¶
method
public
🟡delete
¶
method
public
🟡get
¶
method
public
🟡set
¶
method
public
🟢Spinner
¶
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%widths
: width of the outside ring and inside ringmode
: mode of the Spinneranchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡destroy
¶
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 widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡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 widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡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 textdefault
: default state of the widgetcommand
: a function that is triggered when the state of check button is onimage
: image of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡get
¶
method
public
🟡set
¶
method
public
🟢Tooltip
¶
class
public
| Widget
widget
: the associated widgetsize
: size of the widgettext
: text of the widgetalign
: align mode of the tooltippadding
: extra padding between tooltip and the associated 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 textgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget
🟡_display
¶
method
protected
🟢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 textcommand
: a function that is triggered when the underline button is pressedimage
: image of the widgetanchor
: anchor of the widgetcapture_events
: wether detect another widget under the widgetgradient_animation
: wether enable gradient_animationauto_update
: whether the theme manager update it automaticallystyle
: style of the widget