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