gh-78335: Complete the widget option lists in tkinter docstrings (GH-… · python/cpython@ba0c0e6

GitHub

@@ -3040,10 +3040,11 @@ class Toplevel(BaseWidget, Wm):

30403040def__init__(self, master=None, cnf={}, **kw):

30413041"""Construct a toplevel widget with the parent MASTER.

304230423043- Valid option names: background, bd, bg, borderwidth, class,

3044- colormap, container, cursor, height, highlightbackground,

3045- highlightcolor, highlightthickness, menu, relief, screen, takefocus,

3046- use, visual, width."""

3043+ Valid option names: background, backgroundimage (Tk 9.0+), bd, bg,

3044+ bgimg (Tk 9.0+), borderwidth, class, colormap, container,

3045+ cursor, height, highlightbackground, highlightcolor,

3046+ highlightthickness, menu, padx, pady, relief, screen,

3047+ takefocus, tile (Tk 9.0+), use, visual, width."""

30473048ifkw:

30483049cnf=_cnfmerge((cnf, kw))

30493050extra= ()

@@ -3442,12 +3443,13 @@ def __init__(self, master=None, cnf={}, **kw):

34423443"""Construct a checkbutton widget with the parent MASTER.

3443344434443445 Valid option names: activebackground, activeforeground, anchor,

3445- background, bd, bg, bitmap, borderwidth, command, cursor,

3446- disabledforeground, fg, font, foreground, height,

3447- highlightbackground, highlightcolor, highlightthickness, image,

3448- indicatoron, justify, offvalue, onvalue, padx, pady, relief,

3449- selectcolor, selectimage, state, takefocus, text, textvariable,

3450- underline, variable, width, wraplength."""

3446+ background, bd, bg, bitmap, borderwidth, command, compound,

3447+ cursor, disabledforeground, fg, font, foreground, height,

3448+ highlightbackground, highlightcolor, highlightthickness,

3449+ image, indicatoron, justify, offrelief, offvalue, onvalue,

3450+ overrelief, padx, pady, relief, selectcolor, selectimage,

3451+ state, takefocus, text, textvariable, tristateimage,

3452+ tristatevalue, underline, variable, width, wraplength."""

34513453Widget.__init__(self, master, 'checkbutton', cnf, kw)

3452345434533455def_setup(self, master, cnf):

@@ -3491,13 +3493,15 @@ def __init__(self, master=None, cnf={}, **kw):

34913493"""Construct an entry widget with the parent MASTER.

3492349434933495 Valid option names: background, bd, bg, borderwidth, cursor,

3494- exportselection, fg, font, foreground, highlightbackground,

3495- highlightcolor, highlightthickness, insertbackground,

3496- insertborderwidth, insertofftime, insertontime, insertwidth,

3497- invalidcommand, invcmd, justify, relief, selectbackground,

3498- selectborderwidth, selectforeground, show, state, takefocus,

3499- textvariable, validate, validatecommand, vcmd, width,

3500- xscrollcommand."""

3496+ disabledbackground, disabledforeground, exportselection, fg,

3497+ font, foreground, highlightbackground, highlightcolor,

3498+ highlightthickness, insertbackground, insertborderwidth,

3499+ insertofftime, insertontime, insertwidth, invalidcommand,

3500+ invcmd, justify, locale (Tk 9.1+), placeholder (Tk 9.0+),

3501+ placeholderforeground (Tk 9.0+), readonlybackground, relief,

3502+ selectbackground, selectborderwidth, selectforeground, show,

3503+ state, takefocus, textvariable, validate, validatecommand,

3504+ vcmd, width, xscrollcommand."""

35013505Widget.__init__(self, master, 'entry', cnf, kw)

3502350635033507defdelete(self, first, last=None):

@@ -3584,9 +3588,11 @@ class Frame(Widget):

35843588def__init__(self, master=None, cnf={}, **kw):

35853589"""Construct a frame widget with the parent MASTER.

358635903587- Valid option names: background, bd, bg, borderwidth, class,

3588- colormap, container, cursor, height, highlightbackground,

3589- highlightcolor, highlightthickness, relief, takefocus, visual, width."""

3591+ Valid option names: background, backgroundimage (Tk 9.0+), bd, bg,

3592+ bgimg (Tk 9.0+), borderwidth, class, colormap, container,

3593+ cursor, height, highlightbackground, highlightcolor,

3594+ highlightthickness, padx, pady, relief, takefocus, tile (Tk

3595+ 9.0+), visual, width."""

35903596cnf=_cnfmerge((cnf, kw))

35913597extra= ()

35923598if'class_'incnf:

@@ -3616,7 +3622,8 @@ def __init__(self, master=None, cnf={}, **kw):

3616362236173623 WIDGET-SPECIFIC OPTIONS

361836243619- height, state, width

3625+ compound, height, state,

3626+ textangle (Tk 9.1+), width

3620362736213628 """

36223629Widget.__init__(self, master, 'label', cnf, kw)

@@ -3628,11 +3635,14 @@ class Listbox(Widget, XView, YView):

36283635def__init__(self, master=None, cnf={}, **kw):

36293636"""Construct a listbox widget with the parent MASTER.

363036373631- Valid option names: background, bd, bg, borderwidth, cursor,

3632- exportselection, fg, font, foreground, height, highlightbackground,

3633- highlightcolor, highlightthickness, relief, selectbackground,

3634- selectborderwidth, selectforeground, selectmode, setgrid, takefocus,

3635- width, xscrollcommand, yscrollcommand, listvariable."""

3638+ Valid option names: activestyle, background, bd, bg, borderwidth,

3639+ cursor, disabledforeground, exportselection, fg, font,

3640+ foreground, height, highlightbackground, highlightcolor,

3641+ highlightthickness, inactiveselectbackground (Tk 9.1+),

3642+ inactiveselectforeground (Tk 9.1+), justify, listvariable,

3643+ relief, selectbackground, selectborderwidth, selectforeground,

3644+ selectmode, setgrid, state, takefocus, width, xscrollcommand,

3645+ yscrollcommand."""

36363646Widget.__init__(self, master, 'listbox', cnf, kw)

3637364736383648defactivate(self, index):

@@ -3742,7 +3752,8 @@ def __init__(self, master=None, cnf={}, **kw):

37423752"""Construct menu widget with the parent MASTER.

3743375337443754 Valid option names: activebackground, activeborderwidth,

3745- activeforeground, background, bd, bg, borderwidth, cursor,

3755+ activeforeground, activerelief (Tk 9.0+), background, bd, bg,

3756+ borderwidth, cursor,

37463757 disabledforeground, fg, font, foreground, postcommand, relief,

37473758 selectcolor, takefocus, tearoff, tearoffcommand, title, type."""

37483759Widget.__init__(self, master, 'menu', cnf, kw)

@@ -3880,13 +3891,27 @@ class Menubutton(Widget):

38803891"""Menubutton widget, obsolete since Tk8.0."""

3881389238823893def__init__(self, master=None, cnf={}, **kw):

3894+"""Construct a menubutton widget with the parent MASTER.

3895+3896+ Valid option names: activebackground, activeforeground, anchor,

3897+ background, bd, bg, bitmap, borderwidth, compound, cursor,

3898+ direction, disabledforeground, fg, font, foreground, height,

3899+ highlightbackground, highlightcolor, highlightthickness,

3900+ image, indicatoron, justify, menu, padx, pady, relief, state,

3901+ takefocus, text, textvariable, underline, width, wraplength."""

38833902Widget.__init__(self, master, 'menubutton', cnf, kw)

388439033885390438863905classMessage(Widget):

38873906"""Message widget to display multiline text. Obsolete since Label does it too."""

3888390738893908def__init__(self, master=None, cnf={}, **kw):

3909+"""Construct a message widget with the parent MASTER.

3910+3911+ Valid option names: anchor, aspect, background, bd, bg, borderwidth,

3912+ cursor, fg, font, foreground, highlightbackground,

3913+ highlightcolor, highlightthickness, justify, padx, pady,

3914+ relief, takefocus, text, textvariable, width."""

38903915Widget.__init__(self, master, 'message', cnf, kw)

3891391638923917@@ -3897,12 +3922,13 @@ def __init__(self, master=None, cnf={}, **kw):

38973922"""Construct a radiobutton widget with the parent MASTER.

3898392338993924 Valid option names: activebackground, activeforeground, anchor,

3900- background, bd, bg, bitmap, borderwidth, command, cursor,

3901- disabledforeground, fg, font, foreground, height,

3902- highlightbackground, highlightcolor, highlightthickness, image,

3903- indicatoron, justify, padx, pady, relief, selectcolor, selectimage,

3904- state, takefocus, text, textvariable, underline, value, variable,

3905- width, wraplength."""

3925+ background, bd, bg, bitmap, borderwidth, command, compound,

3926+ cursor, disabledforeground, fg, font, foreground, height,

3927+ highlightbackground, highlightcolor, highlightthickness,

3928+ image, indicatoron, justify, offrelief, overrelief, padx,

3929+ pady, relief, selectcolor, selectimage, state, takefocus,

3930+ text, textvariable, tristateimage, tristatevalue, underline,

3931+ value, variable, width, wraplength."""

39063932Widget.__init__(self, master, 'radiobutton', cnf, kw)

3907393339083934defdeselect(self):

@@ -4033,9 +4059,11 @@ def __init__(self, master=None, cnf={}, **kw):

4033405940344060 WIDGET-SPECIFIC OPTIONS

403540614036- autoseparators, height, maxundo,

4037- spacing1, spacing2, spacing3,

4038- state, tabs, undo, width, wrap,

4062+ autoseparators, blockcursor, endline,

4063+ height, inactiveselectbackground,

4064+ insertunfocussed, locale (Tk 9.1+), maxundo,

4065+ spacing1, spacing2, spacing3, startline,

4066+ state, tabs, tabstyle, undo, width, wrap,

4039406740404068 """

40414069Widget.__init__(self, master, 'text', cnf, kw)

@@ -5002,9 +5030,12 @@ def __init__(self, master=None, cnf={}, **kw):

50025030 buttondownrelief, buttonuprelief,

50035031 command, disabledbackground,

50045032 disabledforeground, format, from,

5005- invalidcommand, increment,

5033+ invalidcommand, invcmd, increment,

5034+ locale (Tk 9.1+),

5035+ placeholder (Tk 9.0+),

5036+ placeholderforeground (Tk 9.0+),

50065037 readonlybackground, state, to,

5007- validate, validatecommand values,

5038+ validate, validatecommand, vcmd, values,

50085039 width, wrap,

50095040 """

50105041Widget.__init__(self, master, 'spinbox', cnf, kw)

@@ -5201,8 +5232,9 @@ def __init__(self, master=None, cnf={}, **kw):

52015232 WIDGET-SPECIFIC OPTIONS

5202523352035234 handlepad, handlesize, opaqueresize,

5204- sashcursor, sashpad, sashrelief,

5205- sashwidth, showhandle,

5235+ proxybackground, proxyborderwidth,

5236+ proxyrelief, sashcursor, sashpad,

5237+ sashrelief, sashwidth, showhandle,

52065238 """

52075239Widget.__init__(self, master, 'panedwindow', cnf, kw)

52085240