Artifact
ed7e9c23e8b158323ddb80dda19c413ef501fbea:
Attachment "pitsana.tk" to
ticket [1943546fff]
added by
kaitzschu
2008-04-16 08:09:28.
0000: 73 65 74 20 74 20 5b 74 65 78 74 20 2e 74 20 2d set t [text .t -
0010: 68 65 69 67 68 74 20 31 30 20 2d 77 69 64 74 68 height 10 -width
0020: 20 35 30 20 2d 77 72 61 70 20 77 6f 72 64 5d 0a 50 -wrap word].
0030: 23 20 69 66 20 77 69 64 67 65 74 20 69 73 20 64 # if widget is d
0040: 72 61 77 6e 20 65 72 72 6f 72 20 64 6f 65 73 6e rawn error doesn
0050: 27 74 20 6f 63 63 75 72 2c 20 73 6f 20 64 72 61 't occur, so dra
0060: 77 20 69 74 20 6e 6f 74 0a 0a 2e 74 20 69 6e 73 w it not...t ins
0070: 65 72 74 20 65 6e 64 20 7b 4d 75 75 74 61 6d 69 ert end {Muutami
0080: 61 73 61 6e 6f 6a 61 61 69 6e 61 79 68 74 65 65 asanojaainayhtee
0090: 6e 20 6b 69 72 6a 6f 74 65 74 74 75 6e 61 6a 6f n kirjotettunajo
00a0: 74 74 61 73 61 61 64 61 61 6e 6d 65 6c 6b 6f 69 ttasaadaanmelkoi
00b0: 73 65 6e 20 70 69 74 6b 69 c3 a4 73 61 6e 6f 6a sen pitkiƤsanoj
00c0: 61 6a 6f 69 74 61 73 69 74 74 65 6e 7d 0a 23 20 ajoitasitten}.#
00d0: 6c 65 73 73 20 74 68 61 6e 20 74 68 61 74 20 69 less than that i
00e0: 73 20 6e 6f 74 20 65 6e 6f 75 67 68 0a 0a 73 65 s not enough..se
00f0: 74 20 69 20 31 2e 30 0a 73 65 74 20 78 69 20 24 t i 1.0.set xi $
0100: 69 0a 0a 77 68 69 6c 65 20 7b 5b 24 74 20 69 6e i..while {[$t in
0110: 64 65 78 20 22 24 69 20 6c 69 6e 65 65 6e 64 22 dex "$i lineend"
0120: 5d 20 6e 65 20 5b 24 74 20 69 6e 64 65 78 20 22 ] ne [$t index "
0130: 24 78 69 20 64 69 73 70 6c 61 79 20 6c 69 6e 65 $xi display line
0140: 65 6e 64 22 5d 7d 20 7b 0a 20 70 75 74 73 20 5b end"]} {. puts [
0150: 24 74 20 67 65 74 20 22 24 69 20 2b 20 31 20 64 $t get "$i + 1 d
0160: 69 73 70 6c 61 79 20 6c 69 6e 65 73 20 64 69 73 isplay lines dis
0170: 70 6c 61 79 20 6c 69 6e 65 73 74 61 72 74 22 20 play linestart"
0180: 22 24 69 20 2b 20 31 20 64 69 73 70 6c 61 79 20 "$i + 1 display
0190: 6c 69 6e 65 73 20 64 69 73 70 6c 61 79 20 6c 69 lines display li
01a0: 6e 65 65 6e 64 22 5d 0a 20 73 65 74 20 69 20 5b neend"]. set i [
01b0: 24 74 20 69 6e 64 65 78 20 22 24 69 20 2b 20 31 $t index "$i + 1
01c0: 20 64 69 73 70 6c 61 79 20 6c 69 6e 65 73 22 5d display lines"]
01d0: 0a 7d 0a .}.