2009-06-24

Tkhtml v3

TkHTML

Tkhtml 是個通過 ACID2,for Tk 可以用來顯示 HTML/CSS 內容的 widget。

下面是在 Tcler's Wiki 上示範使用 Tkhtml 做出一個 Label widget 的範例:
package require Tkhtml 3.0

# Create and populate an html widget.
html .label -shrink 1
.label parse -final {
<b>Hello <i>world</i></b> example
}

# Pack the new html widget
pack .label

bind .label <KeyPress-q> exit
focus .label

沒有留言: