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

Interfaces Graphiques Perl Discussion :

fixer la position et la taille d'une fenetre Tk


Sujet :

Interfaces Graphiques Perl

  1. #1
    Membre habitué Avatar de astrotouf
    Profil pro
    Consultant informatique
    Inscrit en
    Avril 2005
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Consultant informatique

    Informations forums :
    Inscription : Avril 2005
    Messages : 221
    Points : 132
    Points
    132
    Par défaut fixer la position et la taille d'une fenetre Tk
    salut à tous . je recherche le moyen de fixer la taille et l'emplacement d'une fenêtre MainWindow mais je trouve pas;
    Pourriez-vous m'aider s'il vous plaît ?
    Q: ça sert à quoi Internet Explorer ?
    R: A télécharger Mozilla Firefox

  2. #2
    Expert éminent
    Avatar de Jedai
    Homme Profil pro
    Enseignant
    Inscrit en
    Avril 2003
    Messages
    6 245
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Avril 2003
    Messages : 6 245
    Points : 8 586
    Points
    8 586
    Par défaut
    La documentation de Tk::Wm dit :
    $toplevel->geometry(?newGeometry?)

    If newGeometry is specified, then the geometry of $toplevel is changed and an empty string is returned. Otherwise the current geometry for $toplevel is returned (this is the most recent geometry specified either by manual resizing or in a geometry method). NewGeometry has the form =widthxheight+-x+-y, where any of =, widthxheight, or +-x+-y may be omitted. Width and height are positive integers specifying the desired dimensions of $toplevel. If $toplevel is gridded (see "GRIDDED GEOMETRY MANAGEMENT" below) then the dimensions are specified in grid units; otherwise they are specified in pixel units. X and y specify the desired location of $toplevel on the screen, in pixels. If x is preceded by +, it specifies the number of pixels between the left edge of the screen and the left edge of $toplevel's border; if preceded by - then x specifies the number of pixels between the right edge of the screen and the right edge of $toplevel's border. If y is preceded by + then it specifies the number of pixels between the top of the screen and the top of $toplevel's border; if y is preceded by - then it specifies the number of pixels between the bottom of $toplevel's border and the bottom of the screen. If newGeometry is specified as an empty string then any existing user-specified geometry for $toplevel is cancelled, and the window will revert to the size requested internally by its widgets.
    --
    Jedaï

  3. #3
    Membre habitué Avatar de astrotouf
    Profil pro
    Consultant informatique
    Inscrit en
    Avril 2005
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Consultant informatique

    Informations forums :
    Inscription : Avril 2005
    Messages : 221
    Points : 132
    Points
    132
    Par défaut
    merci Jedai il fallait donc chercher dans la classe mère.
    Q: ça sert à quoi Internet Explorer ?
    R: A télécharger Mozilla Firefox

  4. #4
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2003
    Messages
    42
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2003
    Messages : 42
    Points : 43
    Points
    43
    Par défaut
    ou plus simplement :
    $main_window->geometry("largeurxhauteur+position_x+position_y") ;
    Progresse en programmation

  5. #5
    Membre habitué Avatar de astrotouf
    Profil pro
    Consultant informatique
    Inscrit en
    Avril 2005
    Messages
    221
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Consultant informatique

    Informations forums :
    Inscription : Avril 2005
    Messages : 221
    Points : 132
    Points
    132
    Par défaut
    je met un exemple pour les gens que ça intéresse :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    MainWindow->geometry(640x480)
    Bon courage
    Q: ça sert à quoi Internet Explorer ?
    R: A télécharger Mozilla Firefox

  6. #6
    Responsable Perl et Outils

    Avatar de djibril
    Homme Profil pro
    Inscrit en
    Avril 2004
    Messages
    19 820
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Avril 2004
    Messages : 19 820
    Points : 499 184
    Points
    499 184
    Par défaut
    ou pour les decalages
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    MainWindow->geometry("700x600+20+20");

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [AC-2007] Fixer la position et la taille d'un état à l'ouverture
    Par CrasherSEP dans le forum IHM
    Réponses: 1
    Dernier message: 10/06/2011, 13h32
  2. [DOM] fixer la position d'un calque sur une page
    Par fraizas77 dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 04/04/2009, 13h20
  3. Forcer la taille d'une fenetre
    Par uloaccess dans le forum Access
    Réponses: 6
    Dernier message: 04/11/2005, 17h25
  4. [ popup ] maximiser la taille d'une fenetre dès le début
    Par sleepy2002 dans le forum Général JavaScript
    Réponses: 1
    Dernier message: 26/10/2005, 10h19
  5. modifier la taille d'une fenetre CDialog
    Par Joeleclems dans le forum MFC
    Réponses: 4
    Dernier message: 12/05/2005, 17h36

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