@@ -47,9 +47,6 @@ _Padding: TypeAlias = (
47
47
| tuple [float | str , float | str , float | str , float | str ]
48
48
)
49
49
50
- # from ttk_widget (aka ttk::widget) manual page, differs from compound
51
- _TtkCompound : TypeAlias = Literal ["" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ]
52
-
53
50
# Last item (option value to apply) varies between different options so use Any.
54
51
# It could also be any iterable with items matching the tuple, but that case
55
52
# hasn't been added here for consistency with _Padding above.
@@ -216,7 +213,7 @@ class Button(Widget):
216
213
* ,
217
214
class_ : str = "" ,
218
215
command : str | Callable [[], Any ] = "" ,
219
- compound : _TtkCompound = "" ,
216
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = "" ,
220
217
cursor : tkinter ._Cursor = "" ,
221
218
default : Literal ["normal" , "active" , "disabled" ] = "normal" ,
222
219
image : tkinter ._Image | str = "" ,
@@ -236,7 +233,7 @@ class Button(Widget):
236
233
cnf : dict [str , Any ] | None = None ,
237
234
* ,
238
235
command : str | Callable [[], Any ] = ...,
239
- compound : _TtkCompound = ...,
236
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = ...,
240
237
cursor : tkinter ._Cursor = ...,
241
238
default : Literal ["normal" , "active" , "disabled" ] = ...,
242
239
image : tkinter ._Image | str = ...,
@@ -261,7 +258,7 @@ class Checkbutton(Widget):
261
258
* ,
262
259
class_ : str = "" ,
263
260
command : str | Callable [[], Any ] = "" ,
264
- compound : _TtkCompound = "" ,
261
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = "" ,
265
262
cursor : tkinter ._Cursor = "" ,
266
263
image : tkinter ._Image | str = "" ,
267
264
name : str = ...,
@@ -286,7 +283,7 @@ class Checkbutton(Widget):
286
283
cnf : dict [str , Any ] | None = None ,
287
284
* ,
288
285
command : str | Callable [[], Any ] = ...,
289
- compound : _TtkCompound = ...,
286
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = ...,
290
287
cursor : tkinter ._Cursor = ...,
291
288
image : tkinter ._Image | str = ...,
292
289
offvalue : Any = ...,
@@ -517,7 +514,7 @@ class Label(Widget):
517
514
border : float | str = ..., # alias for borderwidth
518
515
borderwidth : float | str = ..., # undocumented
519
516
class_ : str = "" ,
520
- compound : _TtkCompound = "" ,
517
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = "" ,
521
518
cursor : tkinter ._Cursor = "" ,
522
519
font : _FontDescription = ...,
523
520
foreground : str = "" ,
@@ -544,7 +541,7 @@ class Label(Widget):
544
541
background : str = ...,
545
542
border : float | str = ...,
546
543
borderwidth : float | str = ...,
547
- compound : _TtkCompound = ...,
544
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = ...,
548
545
cursor : tkinter ._Cursor = ...,
549
546
font : _FontDescription = ...,
550
547
foreground : str = ...,
@@ -617,7 +614,7 @@ class Menubutton(Widget):
617
614
master : tkinter .Misc | None = None ,
618
615
* ,
619
616
class_ : str = "" ,
620
- compound : _TtkCompound = "" ,
617
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = "" ,
621
618
cursor : tkinter ._Cursor = "" ,
622
619
direction : Literal ["above" , "below" , "left" , "right" , "flush" ] = "below" ,
623
620
image : tkinter ._Image | str = "" ,
@@ -637,7 +634,7 @@ class Menubutton(Widget):
637
634
self ,
638
635
cnf : dict [str , Any ] | None = None ,
639
636
* ,
640
- compound : _TtkCompound = ...,
637
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = ...,
641
638
cursor : tkinter ._Cursor = ...,
642
639
direction : Literal ["above" , "below" , "left" , "right" , "flush" ] = ...,
643
640
image : tkinter ._Image | str = ...,
@@ -806,7 +803,7 @@ class Radiobutton(Widget):
806
803
* ,
807
804
class_ : str = "" ,
808
805
command : str | Callable [[], Any ] = "" ,
809
- compound : _TtkCompound = "" ,
806
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = "" ,
810
807
cursor : tkinter ._Cursor = "" ,
811
808
image : tkinter ._Image | str = "" ,
812
809
name : str = ...,
@@ -827,7 +824,7 @@ class Radiobutton(Widget):
827
824
cnf : dict [str , Any ] | None = None ,
828
825
* ,
829
826
command : str | Callable [[], Any ] = ...,
830
- compound : _TtkCompound = ...,
827
+ compound : Literal [ "" , "text" , "image" , "top" , "left" , "center" , "right" , "bottom" , "none" ] = ...,
831
828
cursor : tkinter ._Cursor = ...,
832
829
image : tkinter ._Image | str = ...,
833
830
padding = ...,
0 commit comments