¿Cómo se establece la fuente predeterminada para los widgets Tk
-
05-07-2019 - |
Pregunta
Tengo una aplicación Tcl / Tk que genera muchas formas y me gustaría poder configurar las fuentes de widget predeterminadas desde una ubicación central sin tener que configurar cada widget con el interruptor -font
.
#!<path>/wish
button .hello -text "Hello, World!" -command { exit }
pack .hello
puts "--- i would like to set this thing: [.hello configure -font] --- "
Solución
Intenta agregar,
font create myDefaultFont -family Helvetica -size 20
option add *font myDefaultFont
a la parte superior de su script. (enlace al artículo sobre fuentes)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow