python - How do I set a button as the focus using tkinter? -


I want to open a window with the focus set on the first button, so I do not have its tab.
If the widget is an entry widget I

  widget_name.focus ()  

can not be displayed as a button widget.

Looks like an equivalent to me.

  Tkinter.Button = Square button (widget) | Button Widget | | Method Resolution Order: | Button | Widgets | Basewater | Miscellaneous | Pack | Place | Grid | Builtins.object ... | Focus = Focus_set (self) | Focus direct input on this widget. | | If there is currently no focus in the application. This widget will be noticed if the application is available. Focus through window manager  

and tkinter.py

  class variation: # ... focus = focus_set # XXX B / Y Compat?  

Comments