Posted to tcl by jeremy_c at Thu Sep 13 18:29:49 GMT 2007view raw

  1. proc create_type_combo {name current} {
  2. ttk::menubutton $name -width 15
  3.  
  4. set tm [menu $name.menu]
  5. $tm add command -label "All" -command { $name configure -text "All" }
  6. $tm add command -label "Procedure" -command { $name configure -text "Procedure" }
  7. $tm add command -label "JCode" -command { $name configure -text "JCode" }
  8. $tm add command -label "Formulary" -command { $name configure -text "Formulary" }
  9.  
  10. $name configure -menu $tm
  11. }