[Bug] MacOS TK/TTK buttons appear enabled when disabled
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Commencez par la reproduction de bouton fournie et comparez les captures d’écran MacOS et Windows, en vous concentrant sur les boutons tkinter désactivés et les paramètres signalés button_color, disabled_button_color et use_ttk_buttons. Le travail est terminé lorsque les boutons désactivés ont un repère visuel clair sur MacOS sans modifier l’apparence des boutons activés.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Type of Issue (Enhancement, Error, Bug, Question)
Question
Operating System
MacOS Ventura 13.2.1
PySimpleGUI Port (tkinter, Qt, Wx, Web)
tkinter
Versions
Version information can be obtained by calling sg.main_get_debug_data()
Or you can print each version shown in ()
Python version (sg.sys.version)
Python Interpeter: c:\Users\Eric\code\ztoolkit.venv\Scripts\python.exe
Python version: 3.11.2
Platform: Windows
Platform version: ('10', '10.0.22000', 'SP0', 'Multiprocessor Free')
Port: PySimpleGUI
tkinter version: 8.6.12
PySimpleGUI version: 4.60.4.135
PySimpleGUI filename: c:\Users\Eric\code\ztoolkit.venv\Lib\site-packages\PySimpleGUI\PySimpleGUI.py
Your Experience In Months or Years (optional)
Years Python programming experience
5
Years Programming experience overall
5
Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine)
no
Anything else you think would be helpful?
Troubleshooting
These items may solve your problem. Please check those you've done by changing - [ ] to - [X]
- Searched main docs for your problem www.PySimpleGUI.org
- Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demos.PySimpleGUI.org
- If not tkinter - looked for Demo Programs for specific port
- #6322
- Run your program outside of your debugger (from a command line)
- Searched through Issues (open and closed) to see if already reported Issues.PySimpleGUI.org
- Have upgraded to the latest release of PySimpleGUI on PyPI (lastest official version)
- Tried using the PySimpleGUI.py file on GitHub. Your problem may have already been fixed but not released
Detailed Description
I can't seem to get button_color, or disabled_button_color to work on MacOS. Strangely enough, themes do work. In my app, I initially disable some buttons until certain conditions are met. On Windows, this works well since there is a visual cue (greyed text) that the button is disabled. On, Mac, there is no visual cue; the button is disabled but appears enabled.
I tried setting sg.Window(use_ttk_buttons = False) as well to no effect whatsoever. Using button_color, or disabled_button_color also has no effect.
Is this expected behavior due to some limitation or is it layer 8?
Thank you kindly in advance!
Code To Duplicate
A short program that isolates and demonstrates the problem (Do not paste your massive program, but instead 10-20 lines that clearly show the problem)
This pre-formatted code block is all set for you to paste in your bit of code:
# Elements
frame_zvpn_actions = [
[sg.Button(' VPN Logs ', key='-LOGS_ZVPN-', disabled=True, tooltip='Fetch the VPN tunnel logs')
,sg.Button(' SA Status ', key='-STATUS_ZVPN-', disabled=True, tooltip='Instance mode only. Show the VPN tunnel SA and policy status')
,sg.Button(' IKEv1 Debug ', key='-DEBUG_ZVPN-', disabled=True, tooltip='Instance mode only. IKEv1 only. Run a debug for an IKEv1 tunnel')
,sg.Button(' Copy CMDs ', key='-COPY_CMD_ZVPN-', disabled=True, tooltip='Copy the CLI commands to the clipboard')
,sg.Button(' Save ', key='-SAVE_ZVPN-', disabled=True, tooltip='Save the all outputs to a workflow or file')
,sg.Button(' Reset ', key='-RESET_ZVPN-', disabled=False, tooltip='Reset all the fields')]
]
# Layout
tab_ZVPN_layout = [
[sg.Button('?', pad=PAD_HBUT5, font=TXTB_FONT, key='-BTN_ZVPN-')
,sg.Text('Info: Locate a ZVPN node and grep the VPN logs. Select a mode first.', pad=PAD5, font=TXTB_FONT)]
,[sg.Frame('Actions', pad=PAD_FRAME6, font=TXTB_FONT, layout=frame_zvpn_actions, expand_x=False,
expand_y=False)]
]
# Main window
window = sg.Window(
f'zToolkit (zTK) v{ver}', layout=layout, size=SZ_MAIN
,resizable=False, finalize=True, element_justification='center', icon=iconB64
)
# Main loop
while True:
try:
windows, event, values = sg.read_all_windows()
threadCountLoop = threading.active_count()
threadEnumLoop = threading.enumerate()
logger.debug(f'[__main__:threadCountLoop] Thread count: {threadCountLoop}')
logger.debug(f'[__main__:threadEnumLoop] Active threads: {threadEnumLoop}')
#===== Main GUI =====#
# Main - Exit
if event == sg.WIN_CLOSED or event == 'Exit::-EXIT_MAIN-': # If user closes window or clicks Exit button
connRunning = False
winClosed = True # Stop session keepalive loop
break
Screenshot, Sketch, or Drawing
MacOS

Red = Disabled button
Green = Enabled button
Windows

Red = Disabled button
Green = Enabled button
Watcha Makin?
A ZTNA cloud troubleshooting toolkit for my team.
If you care to share something about your project, it would be awesome to hear what you're building.
- Langage dominant
- Python
- Étoiles
- 13.8k
- Forks
- 1.8k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PySimpleGUI/PySimpleGUI
-
Bug Done - Install Dev Build (see docs for how) Platform Specific Issue - Linux Port - TK
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
PySimpleGUI/PySimpleGUI#6904 · 15 commentaires ·
-
Bug Demo Programs Done - Install Dev Build (see docs for how) Interoperability Port - TK workaround available
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
PySimpleGUI/PySimpleGUI#6900 · 1 commentaire ·
-
Done - Install Dev Build (see docs for how) enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
PySimpleGUI/PySimpleGUI#3251 · 12 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 74/100
PySimpleGUI/PySimpleGUI#6906 · 1 commentaire · 1 réaction ·
-
Bug Done - Install Dev Build (see docs for how) Port - TK
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
PySimpleGUI/PySimpleGUI#6902 · 1 commentaire ·
Toutes les issues de PySimpleGUI/PySimpleGUI
Issues similaires
-
essnmx good first issue
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
-
[Feature] 奇物选择添加优先级 Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Giskard-AI/giskard-oss#2840 · 1 commentaire ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Ouvertearea: repo bug perceived difficulty: 2
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
yeti-platform/yeti#1380 ·