Erzeugen:
label = tkinter.Label(self)
Beschriftung:
self.label["text"] = "Name"Layout-Manager:
self.label.pack oder self.label.grid()
ActiveBackground:
self.label.config(activebackground= "yellow") funktioniert nicht bei Tests
ActiveForeground:
self.label.config(activeforeground = "green") funktioniert nicht bei Tests
Background:
self.label.config(background = "green") self.label.config(background = "#FF0000") self.label.config(bg = "#FF0000")
Foreground:
self.label.config(foreground="red") self.label.config(fg="red")
Borderwidth:
self.label.config(borderwidth="2") #pixel
Borderwidth:
self.label.config(bd="2") # pixel
Height:
self.label.config(height="2") # Textzeilen
Justify:
self.label.config(justify("left") self.label.config(justify("right") self.label.config(justify("justify")
overrelief:
self.label.config(overrelief="raised") Mouse Hover sunken flat ridge solid groove
relief:
self.label.config(relief="raised") sunken flat ridge solid groove
state:
self.label.config(state="normal") active enabled disabled
Textvariable:
self.label["text"] = Caption Property für den Schalter
|