Posted to tcl by jeremy_c at Mon Feb 15 15:52:59 GMT 2010view raw

  1. package require Tk
  2.  
  3. ttk::labelframe .lf1
  4. ttk::checkbutton .lf1.cb1 -text "Hello World"
  5. .lf1 configure -labelwidget .lf1.cb1
  6. ttk::entry .lf1.e1
  7. pack .lf1.e1 -fill x
  8.  
  9. ttk::labelframe .lf2
  10. ttk::checkbutton .lf2.cb2 -text "Hello World"
  11. .lf2 configure -labelwidget .lf2.cb2
  12. ttk::entry .lf2.e2
  13. pack .lf2.e2 -fill x
  14.  
  15. ttk::button .b1 -text Bye1 -command exit
  16. ttk::button .b2 -text Bye2 -command exit
  17. ttk::button .b3 -text Bye3 -command exit
  18.  
  19. pack .lf1 .lf2 .b1 .b2 .b3 -fill x -expand yes
  20.  
  21. focus -force .b1