Making a Label that looks the same as a button.

Dustan DustanGroups at gmail.com
Tue Jun 13 09:14:03 EDT 2006


I have a Button object that gets replaced by a Label when clicked.

Button(buttonsframe,text=' ',command=c,font=buttonsFont)
Note that the text is a single space. buttonsFont uses 'Courier New' as
a family.

When clicked, the Button is destroyed and replaced with a Label object:
Label(buttonsframe,text=x,font=buttonsFont,relief=RAISED)

The intent is for the Label object to look identical to the button
object, except for the non-space character x. The Label object is a
little smaller than the Button object. When I set borderwidth, the
label object does increase in size, but that's not going to make it
look the same, since it makes the border thicker.

How do I get the Label object to look just like the Button object?




More information about the Python-list mailing list