2015-03-25

TCL, TK

  • By default, the TK 8.4 doesn't support 
    • TTK (::ttk::), and so the package "tile" is required to support TTK.
      • install "teacup install tile"
      • code "package require tile"
    • Picture format of JPEG & PNG, and so the package "img" is required to support JPEG & PNG.
      • install "teacup install Img"
      • code "package require img::jpeg"
      • code "package require img::png"

  • frame style
    • flat, groove, raised, ridge, solid, sunken

  • font type
    • time, verdana

  • Packing option [pack]
    • -after win  ==> Packs after win in the packing order.
    • -anchor anchor ==> Anchors: center, n, ne, e, se, s, sw, w, or nw.
    • -before win ==> Packs before win in the packing order.
    • -expand boolean ==> Controls expansion into the unclaimed packing cavity.
    • -fill style ==> Controls fill of packing space. Style: x, y, both, or none.
    • -in win ==> Packs inside win.
    • -ipadx amount ==> Horizontal internal padding, in screen units.
    • -ipady amount ==> Vertical internal padding, in screen inits.
    • -padx amount ==> Horizontal external padding, in screen units.
      • May be a list of two screen units for asymmetric padding (Tk 8.4).
    • -pady amount ==> Vertical external padding, in screen units.
      • May be a list of two screen units for asymmetric padding (Tk 8.4).
    • -side side ==> Sides: top, right, bottom, or left. 
  • Entry
    • -show ==> Password
      • set ::txt "thisIsPW"
      • ::ttk::entry .txt -textvariable ::txt -show "*"
      • pack .txt

1 則留言: