Menu

#3028 indicatoron ignored on MacOS X

obsolete: 8.5.12
open-wont-fix
5
2012-11-07
2012-10-25
No

The indicatoron option is ignored for checkbuttons on MacOS X. For example:

checkbutton .b -text "Foo" -indicatoron 0
pack .b

This behaves correctly on linux (showing no checkbox) but on MacOS X the checkbox is displayed regardless of the value of indicatoron.

Discussion

  • Kevin Walzer

    Kevin Walzer - 2012-11-07

    As discussed in the Tkinter mailing list:

    "After looking at the code that implements the checkbutton, it appears that, internally, it is mapped to a specific Cocoa button style (NSSwitchButton) that does not allow us to turn off the checkmark. I suppose we'll have to add this to the list of Tk configuration flags that are ignored in certain contexts when Mac-native widgets are used (background, relief, etc.). "

     
  • Kevin Walzer

    Kevin Walzer - 2012-11-07
    • assigned_to: hobbs --> wordtech
    • status: open --> pending-invalid
     
  • Russell Owen

    Russell Owen - 2012-11-07

    Would it be practical to map to a different native widget if indicatoron is false? (If so, what would happen if the value of indicatoron is changed once the widget is created?).

     
  • Russell Owen

    Russell Owen - 2012-11-07
    • status: pending-invalid --> open-invalid
     
  • Kevin Walzer

    Kevin Walzer - 2012-11-07

    I've experimented with using a different button style to display when indicatoron is false, but I can't get it to work to my satisfaction. There are too many different variables with the button state for it to map cleanly. The current implementation displays a flat shaded button when an image is present, and the checkbutton style otherwise. Trying to add an additional dimension, using the flat button when an image is not present and indicatoron is set to false, results in the flat button displaying in all situations, and we lose the tristate value of the checkbutton style. As a result, I have decided to retain the current implementation, as it has fewer issues than the new one I have played with.

     
  • Kevin Walzer

    Kevin Walzer - 2012-11-07
    • status: open-invalid --> open-wont-fix
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.