gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1KB

  1. # paned1.tcl --
  2. #
  3. # This demonstration script creates a toplevel window containing
  4. # a paned window that separates two windows horizontally.
  5. if {![info exists widgetDemo]} {
  6. error "This script should be run from the \"widget\" demo."
  7. }
  8. package require Tk
  9. set w .paned1
  10. catch {destroy $w}
  11. toplevel $w
  12. wm title $w "Horizontal Paned Window Demonstration"
  13. wm iconname $w "paned1"
  14. positionWindow $w
  15. label $w.msg -font $font -wraplength 4i -justify left -text "The sash between the two coloured windows below can be used to divide the area between them. Use the left mouse button to resize without redrawing by just moving the sash, and use the middle mouse button to resize opaquely (always redrawing the windows in each position.)"
  16. pack $w.msg -side top
  17. ## See Code / Dismiss buttons
  18. set btns [addSeeDismiss $w.buttons $w]
  19. pack $btns -side bottom -fill x
  20. panedwindow $w.pane
  21. pack $w.pane -side top -expand yes -fill both -pady 2 -padx 2m
  22. label $w.pane.left -text "This is the\nleft side" -fg black -bg yellow
  23. label $w.pane.right -text "This is the\nright side" -fg black -bg cyan
  24. $w.pane add $w.pane.left $w.pane.right
上海开阖软件有限公司 沪ICP备12045867号-1