Customising Tk widgets

P

Peter

I am using Windoze, I suspect the appearance attributes I am asking
about here are platform dependent?

Using Tkinter, I would like to generate a Checkbutton that is filled
in with a solid colour rather than a tick mark when selected.

Could somebody provide some pointers as to how I could achieve this?

Also, John Shipman's Tkinter reference shows the Radiobutton drawn as
a diamond and yet when I create one in Windows I get a circle - again,
how and where do I need to look to change this behaviour?

Thanks
Peter
 
R

rantingrick

I am using Windoze, I suspect the appearance attributes I am asking
about here are platform dependent?

not really.
Using Tkinter, I would like to generate a Checkbutton that is filled
in with a solid colour rather than a tick mark when selected.

Why, who cares if it's a check or solid box.
Could somebody provide some pointers as to how I could achieve this?

Ok, Ok, if you *really* need to see this just create a custom widget
using either the canvas or a couple of Label widgets. (psst: i would
use the canvas) For extra credit you could create a custom "ChoiceBox"
widget. Which is a scrollable box containing an unlimited number of
check buttons.
Also, John Shipman's Tkinter reference shows the Radiobutton drawn as
a diamond and yet when I create one in Windows I get a circle - again,
how and where do I need to look to change this behaviour?

Hmm, me thinks John ist using Linistz, at least me thinks?
 
A

Arndt Roger Schneider

Peter said:
I am using Windoze, I suspect the appearance attributes I am asking
about here are platform dependent?

Using Tkinter, I would like to generate a Checkbutton that is filled
in with a solid colour rather than a tick mark when selected.

tk = Tk()
tk.option_add("*Checkbutton.inidcatorOn", 0)
Could somebody provide some pointers as to how I could achieve this?

Also, John Shipman's Tkinter reference shows the Radiobutton drawn as
a diamond and yet when I create one in Windows I get a circle - again,
how and where do I need to look to change this behaviour?

Thanks
Peter

Shipman's screenshots are made under Tk 8.4/X11, featureing the
motif look-a-like.

Tk 8.4 follows the windows user style guide (windows95) under windows.

You could still get the motif look under windows:
Tk 8.5 is bundled with a theming engine ttk, this engine
uses the built-in theming engine under windows xp and later,
but also allows you to supplant this engine.
The related ttk theme is called "classic".

-roger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,147
Latest member
CarenSchni
Top