トップページtech
981コメント378KB

●●●●TCL/TKなら俺に聞け 2●●●●

■ このスレッドは過去ログ倉庫に格納されています
0001デフォルトの名無しさん2007/05/01(火) 14:52:44
【英語サイト】
プロジェクト本拠地
http://tcl.sourceforge.net/
最新版ソースコード
ftp://ftp.tcl.tk/pub/tcl/nightly-cvs/
The Tcler's Wiki
http://wiki.tcl.tk/
The comp.lang.tcl Newsgroup
http://groups.google.com/group/comp.lang.tcl/
ActiveTcl
http://www.activestate.com/products/activetcl/

【日本語サイト】
もっとTcl/Tk
http://www.interq.or.jp/japan/s-imai/tcltk/
Tcl/Tk Scripting Laboratory
http://www.geocities.jp/urano343/tcltk.html
Tcl/Tk Primer
http://mibai.tec.u-ryukyu.ac.jp/~oshiro/Doc/tcltk_primer/
Tcl 8.4.1 Manual Command Reference
http://www.freesoftnet.co.jp/tclkits/doc/TclCmdRef/tcl_contents_jp.htm
CategoryTclTk - mynote
http://reddog.s35.xrea.com/wiki/CategoryTclTk.html

【前スレ】
●●●●TCL/TKなら俺に聞け●●●●
http://pc11.2ch.net/test/read.cgi/tech/1033628416/
0536デフォルトの名無しさん2009/09/29(火) 21:03:35
package require Tk
text .txt -font {"MS Gothic" 12}
button .b1 -text 4tab -command {settab 4}
button .b2 -text 8tab -command {settab 8}

pack .txt -side bottom
pack .b1 .b2 -side left


proc settab {n} {
set font [.txt cget -font]
.txt configure \
-tabstyle wordprocessor \
-tabs "[expr {$n * [font measure $font 0]}] left"
}

.txt insert 0.0 {
12345678901234567890123456789012345678901234567890
#include <stdio.h>

int main(int argc, const char** argv) {
printf();
return 0;
}

}
0537デフォルトの名無しさん2009/09/29(火) 21:09:22
コピペ失敗した・・・前はタブは自動でスペースに置き換えてくれてた
木が刷るのにどういうことだ・・・・

package require Tk
text .txt -font {"MS Gothic" 12} -tabstyle wordprocessor
button .b1 -text 4tab -command {settab 4}
button .b2 -text 8tab -command {settab 8}

pack .txt -side bottom
pack .b1 .b2 -side left

proc settab {n} {
set font [.txt cget -font]
.txt configure -tabs "[expr {$n * [font measure $font 0]}] left"
}

.txt insert 0.0 {
12345678901234567890123456789012345678901234567890
#include <stdio.h>

int main(int argc, const char** argv) {
printf();
return 0;
}

}

■ このスレッドは過去ログ倉庫に格納されています