python / python/cpython

ttk.tkinter.Notebook does not refresh notebook page on Mac unless mouse moves out of tab area

Ouverte
#136,095 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

OS-mac stdlib topic-tkinter type-bug
Langage dominant
Python
Étoiles
77.2k
Forks
35.9k
Métriques de merge des PR
Métriques de PR en attente

Description

Bug report

Bug description:

Test Code:

from tkinter import *
from tkinter.ttk import Notebook

mw = Tk()
mw.title("Notebook Test")
mw.geometry(f"{800}x{800}")

main_page_frame = Frame(mw, borderwidth=1, relief='ridge')
main_page_frame.pack(side='top', expand=1, fill='both')

notebook = Notebook(main_page_frame)
notebook.pack(expand=1, fill='both')

for info in ("one", "two", "three"):
    frame = Frame(mw)
    Label(frame, text=info).pack()
    notebook.add(frame, text=info)

mw.mainloop()

Test Computer

MacOS Sequoia: Version 15.3.1

Problem

prepare

Click on the three tabs, one after another. The behaviour is what one would expect

execution

  • carefully click on a new tab... but don't move the mouse once you have clicked

problem

  • the notebook page does not refresh (i.e. you won't see the label within the notebook)
  • if you move the mouse carefully just within the tab name area, nothing happens
  • if you move the mouse outside of this area, the label will suddenly appear.

Note

Tried this on a windows machine, and the behaviour as it should be, so this problem seems to be a MAC problem (don't have a linux machine so can't try there).

According to the documentation, the MAC python 3.13 has its own version of Tcl/Tk, so maybe this is a Tcl/Tk problem, and not a python problem?

CPython versions tested on:

3.13

Operating systems tested on:

macOS

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par exécuter l’exemple de Notebook fourni sur macOS Sequoia avec Python 3.13 et comparez le comportement lors d’un clic sur un onglet avec Windows. Lisez l’implémentation de tkinter Notebook et le comportement de macOS Tcl/Tk mentionné dans le rapport. C’est terminé lorsqu’en sélectionnant un onglet, sa page s’affiche immédiatement sans déplacer la souris hors de la zone des onglets.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
desktop
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.