Posted to tcl by bjorkintosh at Tue Apr 03 13:52:34 GMT 2012view raw

  1. 1 package require Tk
  2. 2 package require img::jpeg
  3. 3 ttk::style theme use clam
  4. 4 wm withdraw .
  5. 5 #tk_bisque
  6. 6 tk_setPalette background white activeBackground gray activeForeground black
  7. 7 set main .i
  8. 8 toplevel $main
  9. 9 wm title $main "2012"
  10. 10 bind $main <KeyPress-F11> { wm attributes $main -fullscreen 1 }
  11. 11
  12. 12 set solar [image create photo solar -file rsrcs/solar.jpg]
  13. 13 pack [label $main.solar -image solar] -side top -anchor nw
  14. 14
  15. 15 set wind [image create photo wind -file rsrcs/wind.jpg]
  16. 16 pack [label $main.wind -image wind] -side top -anchor ne
  17. 17
  18. 18 set biofuel [image create photo biofuel -file rsrcs/biofuel.jpg]
  19. 19 pack [label $main.biofuel -image biofuel] -side bottom -anchor sw
  20. 20
  21. 21 set logo [image create photo logo -file rsrcs/txtlogo.gif]
  22. 22 pack [label $main.logo -image logo] -side top -anchor n
  23. 23
  24. 24 #set splash [image create photo splash -file rsrcs/splash.jpg]
  25. 25 #pack [label $main.splash -image splash] -expand yes
  26. 26
  27. 27
  28. 28 labelframe $main.power -text "Timer Control"
  29. 29 pack [button $main.power.start -text "Start" -command [puts " "]] -fill both
  30. 30 pack [button $main.power.reset -text "Reset" -command [puts "r"]] -fill both
  31. 31 pack [button $main.power.quit -text "Exit" -command exit] -fill both
  32. 32 pack $main.power -padx 5m -pady 5m -side bottom -anchor se
  33. 33
  34.