Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.


  How can I change the default colors in Tk?
 
 You can change the default colors by modifying your X resource database
for your personal use or use the Tk convenience command `tk_setPalette`.
You can do the first using whatever method you usually use to
add/modify X resources (X default file, etc.), or you can use the Tk
`option` command to change the option database from within a Tk
application.  Tk also has the command tk_bisque which reverts Tk4 to
using the Tk3 default colors.  The easiest way to set your application
to one general scheme is via tk_setPalette like so:

tk_setPalette pink

For more information, see your system`s documentation for loading X
resources, and/or the Tk man page for the `option` and `tk_setPalette`
commands.