Changeset 77
- Timestamp:
- Dec 4, 2009 5:00:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lstview
- Property rcs:date changed from 1999/01/21 22:42:08 to 1999/04/06 21:37:19
- Property rcs:lines changed from +46 -7 to +31 -6
- Property rcs:rev changed from 1.4 to 1.5
r44 r77 1 1 #!/usr/local/bin/wish 2 # $Id$ 2 3 set Revision {$Revision$ $Date$} 3 4 # display a .LST file in a text box … … 6 7 # start work on plotting variables change next line to use 7 8 set plotvars 0 9 set txtvw(font) "Courier" 8 10 set txtvw(menulength) 25 9 11 set txtvw(stringcount) 0 … … 232 234 233 235 proc updatetext {fil {repeat 1}} { 234 global txtvw filename 235 236 global txtvw filename tcl_platform 236 237 if $repeat {after 5000 updatetext $fil} 237 238 set txt [read $fil] … … 247 248 .txt insert end $txt 248 249 } 249 .txt config -state disabled 250 # don't disable in Win as this prevents the highlighting of selected text 251 if {$tcl_platform(platform) != "windows"} { 252 .txt config -state disabled 253 } 250 254 update idletasks 251 255 findrun .txt .a.goto.menu.run $oldend … … 293 297 set fp [open [file join ~ .gsas_config] a] 294 298 puts $fp "set txtvw(followcycle) $txtvw(followcycle)" 299 puts $fp "set txtvw(font) [list $txtvw(font)]" 295 300 close $fp 296 301 } … … 343 348 -yscrollcommand ".yscroll set" \ 344 349 -xscrollcommand ".xscroll set" 345 if {$tcl_version >= 8.0} {.txt config -font Courier}350 if {$tcl_version >= 8.0} {.txt config -font $txtvw(font)} 346 351 scrollbar .yscroll -command ".txt yview" 347 352 scrollbar .xscroll -command ".txt xview" -orient horizontal … … 359 364 .a.file.menu add command -label Exit -command "destroy ." 360 365 366 # windows copy command. Should not be needed in X windows 367 if {$tcl_platform(platform) == "windows"} { 368 pack [menubutton .a.edit -text Edit -underline 0 -menu .a.edit.menu] \ 369 -side left 370 menu .a.edit.menu 371 .a.edit.menu add command -label copy \ 372 -command {catch {clipboard append [selection get]}} 373 } 374 361 375 pack [menubutton .a.goto -text "Go To" -underline 0 -menu .a.goto.menu] \ 362 376 -side left 363 377 menu .a.goto.menu 364 378 .a.goto.menu add cascade -label "Cycle #" -menu .a.goto.menu.cyc \ … … 381 395 menu .a.options.menu 382 396 .a.options.menu add checkbutton -label "Auto Advance" -variable txtvw(followcycle) 397 398 if {$tcl_version >= 8.0} { 399 .a.options.menu add cascade -label Font -menu .a.options.menu.font 400 menu .a.options.menu.font 401 foreach size {5 6 7 8 9 10 11 12 13 14 15 16} { 402 .a.options.menu.font add command -label "Courier $size" \ 403 -command "set txtvw(font) \"Courier $size\"; \ 404 .txt config -font \$txtvw(font)" 405 } 406 } 407 383 408 .a.options.menu add command -label "Save Options" -underline 1 \ 384 409 -command "SaveOptions"
Note: See TracChangeset
for help on using the changeset viewer.