Ttk Checkbutton widget which is either in on- or off-state.
| 595 | |
| 596 | |
| 597 | class Checkbutton(Widget): |
| 598 | """Ttk Checkbutton widget which is either in on- or off-state.""" |
| 599 | |
| 600 | def __init__(self, master=None, **kw): |
| 601 | """Construct a Ttk Checkbutton widget with the parent master. |
| 602 | |
| 603 | STANDARD OPTIONS |
| 604 | |
| 605 | class, compound, cursor, image, state, style, takefocus, |
| 606 | text, textvariable, underline, width |
| 607 | |
| 608 | WIDGET-SPECIFIC OPTIONS |
| 609 | |
| 610 | command, offvalue, onvalue, variable |
| 611 | """ |
| 612 | Widget.__init__(self, master, "ttk::checkbutton", kw) |
| 613 | |
| 614 | |
| 615 | def invoke(self): |
| 616 | """Toggles between the selected and deselected states and |
| 617 | invokes the associated command. If the widget is currently |
| 618 | selected, sets the option variable to the offvalue option |
| 619 | and deselects the widget; otherwise, sets the option variable |
| 620 | to the option onvalue. |
| 621 | |
| 622 | Returns the result of the associated command.""" |
| 623 | return self.tk.call(self._w, "invoke") |
| 624 | |
| 625 | |
| 626 | class Entry(Widget, tkinter.Entry): |
no outgoing calls
no test coverage detected
searching dependent graphs…