Ttk Entry widget displays a one-line text string and allows that string to be edited by the user.
| 624 | |
| 625 | |
| 626 | class Entry(Widget, tkinter.Entry): |
| 627 | """Ttk Entry widget displays a one-line text string and allows that |
| 628 | string to be edited by the user.""" |
| 629 | |
| 630 | def __init__(self, master=None, widget=None, **kw): |
| 631 | """Constructs a Ttk Entry widget with the parent master. |
| 632 | |
| 633 | STANDARD OPTIONS |
| 634 | |
| 635 | class, cursor, style, takefocus, xscrollcommand |
| 636 | |
| 637 | WIDGET-SPECIFIC OPTIONS |
| 638 | |
| 639 | exportselection, invalidcommand, justify, show, state, |
| 640 | textvariable, validate, validatecommand, width |
| 641 | |
| 642 | VALIDATION MODES |
| 643 | |
| 644 | none, key, focus, focusin, focusout, all |
| 645 | """ |
| 646 | Widget.__init__(self, master, widget or "ttk::entry", kw) |
| 647 | |
| 648 | |
| 649 | def bbox(self, index): |
| 650 | """Return a tuple of (x, y, width, height) which describes the |
| 651 | bounding box of the character given by index.""" |
| 652 | return self._getints(self.tk.call(self._w, "bbox", index)) |
| 653 | |
| 654 | |
| 655 | def identify(self, x, y): |
| 656 | """Returns the name of the element at position x, y, or the |
| 657 | empty string if the coordinates are outside the window.""" |
| 658 | return self.tk.call(self._w, "identify", x, y) |
| 659 | |
| 660 | |
| 661 | def validate(self): |
| 662 | """Force revalidation, independent of the conditions specified |
| 663 | by the validate option. Returns False if validation fails, True |
| 664 | if it succeeds. Sets or clears the invalid state accordingly.""" |
| 665 | return self.tk.getboolean(self.tk.call(self._w, "validate")) |
| 666 | |
| 667 | |
| 668 | class Combobox(Entry): |
no outgoing calls
no test coverage detected
searching dependent graphs…