Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hello, how can i change font style in a button?

Status
Not open for further replies.

irenicus

Technical User
Jul 15, 2004
11
FR
hi i'm trying to be able to change the font style of my button i've done:

checkbutton .myButton -bg $Grey -foreground $Black -font {Courier 12} -text Text -selectcolor $Black -indicatoron 0 -command {
if {[ .myButton cget -foreground] == $Black} {
.myButton configure -foreground $Grey
} else {
.myButton configure -foreground $Black
}
} -height 1 -width 1

but the button is too large (high), I think it is because of the spacing between 2 lines. How can i force the spacing between two line?
(note : if you have a better method to change the font color when i ckick on the button i take it)
 
well i have to ask another question : how can I display a custom font (i got the font detail in a .bdf) in a button?
thx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top