Exemple Tcl/Tk

Mise à jour: 10 Septembre 2006
Version: 1.0
Author: Jean-Louis Bicquelet-Salaün
Location: http://jlbicquelet.free.fr
Copyright: (c) 2005-2006 Jean-Louis BICQUELET-SALAÜN
 

widget

  12/12/2005

Exemple montrant commant afficher une image gif dans un canvas. L'image est fichier gif.

exemple:

# Creating a new canvas
canvas .can -width 480 -height 56 -background "#E0FFE0"
pack .can
# Chargement d'une image
image create photo exemple1 -file toolbar2.gif

# Affichage de l'image
.can create image 240 29 -image exemple1

label .lbl1 -text "Exemple de toolbar" -bd 2 -relief sunken
button .btn1 -text Quit -command exit
pack .lbl1  .btn1 -side left

voir aussi

fonctions