[Tkinter-discuss] Checkbutton indicatoron ignored on Mac

Russell E. Owen rowen at uw.edu
Mon Oct 29 21:39:27 CET 2012


In article <5089C2E8.6060307 at codebykevin.com>,
 Kevin Walzer <kw at codebykevin.com> wrote:

> On 10/25/12 12:15 PM, Russell E. Owen wrote:
> > I just realized that the Checkbutton option "indicatoron" is being
> > ignored on Mac OS X: the checkbox is always shown, even if indicatoron
> > is false.
> 
> Can you post a script sample that illustrates the problem?

import Tkinter
root = Tkinter.Tk()
b = Tkinter.Checkbutton(root, text="Foo", indicatoron=False)
b.pack()

It also shows up in tcl (e.g. paste this into wish):
checkbutton .b -text "Foo" -indicatoron 0
pack .b


Note that I have been unable to avoid the bug. Any checkbutton I make 
with indicatoron false still shows the checkbox. Worse, "width" is 
applied as if it the checkbox was NOT there, so the width is far too 
short in that situation. My code had plenty of examples. It really 
messed up my app, though I've been able to work around the worst cases 
by changing the GUI to stop using indicatoron=False.

I'm not sure when this first showed up. Until recently I only ever 
released 32-bit versions, which use ActiveState 8.4.19 and don't show 
the problem.

-- Russell

P.S. While we're on MacOS X bugs, here's another which I also reported 
to the Tcl/Tk project: the width of tk_menubutton is wrong on MacOS X 
(too narrow by several characters). Here's tcl code for that:

tk_optionMenu .om omVar DC1 DC2 DC3
.om configure -width 3 # -indicatoron 0
pack .om

I use wrapper classes for most Tcl/Tk widgets, including OptionMenu, so 
my workaround for this is to simply add 3 to width if a user specifies 
width on MacOS X.



More information about the Tkinter-discuss mailing list