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.

37 lines
1.0KB

  1. # -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
  2. #
  3. # $Id: Sample.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
  4. #
  5. # Tix Demostration Program
  6. #
  7. # This sample program is structured in such a way so that it can be
  8. # executed from the Tix demo program "widget": it must have a
  9. # procedure called "RunSample". It should also have the "if" statment
  10. # at the end of this file so that it can be run as a standalone
  11. # program using tixwish.
  12. # REPLACE WITH DESCRIPTION OF THIS DEMO.
  13. #
  14. proc RunSample {w} {
  15. set top [frame $w.f -bd 1 -relief raised]
  16. set box [tixButtonBox $w.b -bd 1 -relief raised]
  17. pack $box -side bottom -fill both
  18. pack $top -side top -fill both -expand yes
  19. # Create the buttons
  20. #
  21. $box add ok -text Ok -command "destroy $w" -width 6
  22. $box add cancel -text Cancel -command "destroy $w" -width 6
  23. }
  24. if {![info exists tix_demo_running]} {
  25. wm withdraw .
  26. set w .demo
  27. toplevel $w; wm transient $w ""
  28. RunSample $w
  29. bind $w <Destroy> exit
  30. }
上海开阖软件有限公司 沪ICP备12045867号-1