The Button widget. Have to be used in conjunction with its event onclick. Use Widget.onclick.connect in order to register the listener.
| 2203 | |
| 2204 | |
| 2205 | class Button(Widget, _MixinTextualWidget): |
| 2206 | """The Button widget. Have to be used in conjunction with its event onclick. |
| 2207 | Use Widget.onclick.connect in order to register the listener. |
| 2208 | """ |
| 2209 | def __init__(self, text='', *args, **kwargs): |
| 2210 | """ |
| 2211 | Args: |
| 2212 | text (str): The text that will be displayed on the button. |
| 2213 | kwargs: See Widget.__init__() |
| 2214 | """ |
| 2215 | super(Button, self).__init__(*args, **kwargs) |
| 2216 | self.type = 'button' |
| 2217 | self.set_text(text) |
| 2218 | |
| 2219 | |
| 2220 | class TextInput(Widget, _MixinTextualWidget): |