|
次のページ
前のページ
目次へ
13. TCL / TK アプリケーションBruce Stephens からの情報: このコードをファイル、例えば /.mscroll.tcl の中に入れます。 そしてこれを source /.mscroll.tcl として tcl アプリケーションの中で インクルードします。 proc mscroll {bindtag} { bind $bindtag <Button-5> [list %W yview scroll 5 units] bind $bindtag <Button-4> [list %W yview scroll -5 units] bind $bindtag <Shift-Button-5> [list %W yview scroll 1 units] bind $bindtag <Shift-Button-4> [list %W yview scroll -1 units] bind $bindtag <Control-Button-5> [list %W yview scroll 1 pages] bind $bindtag <Control-Button-4> [list %W yview scroll -1 pages] } そして、新しく定義する関数へのパラメータとして、それらを与えることに よって、希望するウィジェット上でバインディングを宣言します。例えば TkMan の最後に下記を追加します。 source ~/.mscroll.tcl mscroll Text
13.1 exmhexmh では、 /.tk/exmh/user.tcl の中で次のようにします: source ~/.mscroll.tcl proc User_Init {} { mscroll TScroll } proc User_Layout {} { mscroll .ftoc.t } 次にログウィンドウのTcl のプロンプトで以下のコマンドを入力する必要があり ます (menu Pref/Hack support/)。 auto_mkindex .tk/exmh/そして exmh を再起動してください。
次のページ 前のページ 目次へ |
[ |