home *** CD-ROM | disk | FTP | other *** search
/ Dream 44 / Amiga_Dream_44.iso / Linux / Pratique / Tcltk / tkcalc3.tcl < prev    next >
Text File  |  1997-09-10  |  1KB  |  61 lines

  1.  
  2. ######################################
  3. # tkcalc4.tcl                        #
  4. ######################################
  5. # Tkcalculator v0.4                  #
  6. ######################################
  7.  
  8. #################################
  9. # Creer l'interface utilisateur #
  10. #################################
  11.  
  12. # bouton "a propos"
  13.  
  14. button .aboutbtn -text "About ..." -command AboutCommand
  15. button .quitbtn -text "Quit" -command exit
  16.  
  17. pack .aboutbtn -side top
  18. pack .quitbtn -side top
  19.  
  20. # commande "a propos"
  21.  
  22. proc AboutCommand {} {
  23.  
  24.     # interface de la boite de dialog "a propos"    
  25.  
  26.     toplevel .aboutdlg
  27.  
  28.     wm geometry .aboutdlg 230x200
  29.  
  30.     wm title .aboutdlg "About Tkcalc..."
  31.  
  32.     frame .aboutdlg.frame1 -bd 2 -relief sunken
  33.  
  34.     message .aboutdlg.frame1.title -justify center -text "Tkcalc 0.4\n\nA Gnu bc frontend"  -width 200
  35.  
  36.     frame .aboutdlg.frame2 -bd 2 -relief groove
  37.  
  38.     message .aboutdlg.frame2.copyright -text "(C) 1997, Fred Pesch.\nDistributed under the Gnu General Public Licence" -relief sunken -width 200
  39.  
  40.     button .aboutdlg.frame2.okbtn -text "Ok" -command AboutOkCommand
  41.  
  42.     # affichage
  43.  
  44.     pack .aboutdlg.frame1 -side top -expand true -padx 20 -pady 4
  45.     pack .aboutdlg.frame1.title -ipadx 20 -ipady 14
  46.  
  47.     pack .aboutdlg.frame2 -side bottom -expand true -fill x -padx 20 -pady 4
  48.     pack .aboutdlg.frame2.copyright -side top -expand true -fill x
  49.     pack .aboutdlg.frame2.okbtn -side bottom
  50. }
  51.  
  52. proc AboutOkCommand {} {
  53.     
  54.     destroy .aboutdlg
  55. }
  56.  
  57.         
  58.  
  59.  
  60.  
  61.