From: Russell E. O. <ro...@uw...> - 2012-11-26 21:32:07
|
I've reported these as bugs and been told they are best discussed before being changed, so here goes: On MacOS X if one specifies a nonzero width (in chars) for a checkbutton or menubutton, the number of chars that will be displayed is far less than the width. This is a change from Tcl/Tk 8.4 to 8.5 and I'm very confused as to why this occurred and why not fix it? In Tcl/Tk 8.4 when a widget took a width parameter measured in chars you could count on the width showing roughly that many chars. Now in 8.5 you cannot. (I have not tried 8.6, but I'll be surprised if it's different than 8.5). This ruined the appearance of much of my application until I hacked around it. Fortunately I subclass checkbutton and menubutton so I could apply the hack in just one place. But I hate to leave things like that in my code. Would it be OK to change Tcl/Tk so that the width option on these widgets actually does specify roughly how many chars could be displayed? Its a simple change, though admittedly one that requires a Mac-specific branch. I guess an obvious question is how widely others are already hacking around this issue. (I assume most users use width=0 and thus don't see this bug). My use case: often I have widgets that can display one of several strings. In that case I usually prefer to specify a width sufficient that the longest string can be displayed. That way the containing window retains its size. -- Russell P.S. the bug numbers are: 3580194 for menubutton not yet reported for checkbutton, given the cold reception to the menubutton bug |