def insert_ttk_label(self, anchor: tk.W or tk.CENTER or tk.E or str=None, background: str="", font: font.Font=None, foreground: str="", justify: tk.LEFT or tk.CENTER or tk.RIGHT or str=None, padding: list=[], relief: tk.FLAT or tk.RAISED or tk.SUNKEN or tk.GROOVE or tk.RIDGE or str="flat", text: str="", wraplength: int=0, index: int or str="end", *args, **kwargs):
"""Insert a ttk.Label into the game."""
widget = ttk.Label(self.text, anchor=anchor, background=background, font=font, foreground=foreground, justify=justify, padding=padding, relief=relief, text=text, wraplength=wraplength, **kwargs)
self.text.window_create(index, window=widget)
return widget
评论列表
文章目录