Posted to tcl by h1rag4mi at Mon Oct 14 12:58:28 GMT 2019view raw

  1. frame .myFrame1 -background red -relief ridge -borderwidth 8 -padx 10 -pady 10 -height 100 -width 100
  2. button .myFrame1.b1 -text "Puts .myFrame1" -command {puts ".myFrame1"}
  3. button .myFrame1.b2 -text "grab ." -command {grab .}
  4. button .myFrame1.b3 -text "grab -global ." -command {grab -global .}
  5. button .b1 -text "Puts ." -command {puts "."}
  6. button .b2 -text "grab .myFrame1" -command {grab .myFrame1}
  7. button .b3 -text "grab -global .myFrame1" -command {grab -global .myFrame1}
  8.  
  9. pack .myFrame1
  10. pack .myFrame1.b1
  11. pack .myFrame1.b2
  12. pack .myFrame1.b3
  13.  
  14. pack .b1
  15. pack .b2
  16. pack .b3