IdentifiantMot de passe
Loading...
Mot de passe oubli� ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les r�ponses en temps r�el, voter pour les messages, poser vos propres questions et recevoir la newsletter

Python Discussion :

probl�me affichage tkinter [Python 3.X]


Sujet :

Python

  1. #1
    Membre averti
    Homme Profil pro
    Coll�gien
    Inscrit en
    Ao�t 2024
    Messages
    13
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Doubs (Franche Comt�)

    Informations professionnelles :
    Activit� : Coll�gien

    Informations forums :
    Inscription : Ao�t 2024
    Messages : 13
    Par d�faut probl�me affichage tkinter
    Bonjour, je voulais vous demander pourquoi y a t-il des contours blanc entre la fen�tre tkinter qui a un fond noir et la toile canvas qui est �galement en noir.


    J'ai abr�g� l'enti�ret� de mon code et le r�sultat est le m�me :

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    1
    2
    3
    4
    5
    6
    7
    8
    from tkinter import *
    fen = Tk()
    fen.configure(bg="black")
    fen.geometry("600x600")
    canvas = Canvas(fen, width=200, height=200, bg="black")
    canvas.pack(expand=True)
    canvas.pack()  
    fen.mainloop()


    Cordialement

  2. #2
    Expert confirm�
    Avatar de jurassic pork
    Homme Profil pro
    Bidouilleur
    Inscrit en
    D�cembre 2008
    Messages
    4 246
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activit� : Bidouilleur
    Secteur : Industrie

    Informations forums :
    Inscription : D�cembre 2008
    Messages : 4 246
    Par d�faut
    hello,
    cela provient de ces propri�t�s :
    highlightbackground=
    Specifies the colour to use as a border highlight when the widget does not have focus. The given value may be any valid Tk colour. The default value is the platform default background colour.

    highlightcolor=
    Specifies the colour to use as a border highlight when the widget has focus. The given value may be any valid Tk colour. The default values are as follows:
    MacOS platform default foreground colour
    Unix black
    Windows platform default �frame� colour
    highlightthickness=
    Specifies a non-negative value indicating the width of the highlight rectangle to draw around the outside of the widget when it has focus. The value may be any valid Tk length. If the value is zero, no focus highlight is drawn around the widget. The default values are as follows:
    MacOS 3
    Unix 1
    Windows 2
    Avec highlightbackground="black" ou highlightthickness=0 on ne voit plus le rectangle blanc.

    Ami calmant, J.P
    Jurassic computer : Sinclair ZX81 - Zilog Z80A � 3,25 MHz - RAM 1 Ko - ROM 8 Ko :zen:

  3. #3
    Membre confirm�
    Homme Profil pro
    Ing�nieur Syst�me
    Inscrit en
    Novembre 2019
    Messages
    22
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    �ge : 50
    Localisation : France, Mayenne (Pays de la Loire)

    Informations professionnelles :
    Activit� : Ing�nieur Syst�me

    Informations forums :
    Inscription : Novembre 2019
    Messages : 22
    Par d�faut
    Bonjour,

    Une rapide recherche avec ton moteur de recherche pr�f�r� t'aurai donn� la solution, sans parler de la doc de canvas.

    Code : S�lectionner tout - Visualiser dans une fen�tre � part
    canvas = Canvas(fen, width=200, height=200, bg="black", highlightthickness=0)

  4. #4
    Membre averti
    Homme Profil pro
    Coll�gien
    Inscrit en
    Ao�t 2024
    Messages
    13
    D�tails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Doubs (Franche Comt�)

    Informations professionnelles :
    Activit� : Coll�gien

    Informations forums :
    Inscription : Ao�t 2024
    Messages : 13
    Par d�faut
    Merci

+ R�pondre � la discussion
Cette discussion est r�solue.

Discussions similaires

  1. Temps d'attente affichage tkinter
    Par Phantom_37 dans le forum Tkinter
    R�ponses: 6
    Dernier message: 28/08/2020, 21h02
  2. R�ponses: 2
    Dernier message: 27/05/2007, 02h38
  3. [Tkinter] affichage d'une image
    Par Slade991 dans le forum Tkinter
    R�ponses: 1
    Dernier message: 30/08/2006, 17h57
  4. [tkinter] probl�me affichage
    Par frizou11 dans le forum Tkinter
    R�ponses: 10
    Dernier message: 13/05/2006, 17h20
  5. R�ponses: 2
    Dernier message: 26/04/2006, 02h24

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo