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