2012-12-27 Jeff Hobbs <jeffh@ActiveState.com>
+ * tkcon.tcl (edit): add support for ::tkcon::OPT(tabspace) to
+ adjust tab spacing in edit window (default: 8). [Bug #7]
+
* tkcon.tcl (::tkcon::Bindings): minimal patch for 8.6b3+ event
compatibility. Larger patch to come that addresses shift towards
virtual events in core widgets. [Bug #48] (gollwitzer)
slaveeval {}
slaveexit close
subhistory 1
+ tabspace 8
gc-delay 60000
gets {congets}
overrideexit 1
proc edit {args} {
variable ::tkcon::PRIV
variable ::tkcon::COLOR
+ variable ::tkcon::OPT
array set opts {-find {} -type {} -attach {} -wrap {none}}
while {[string match -* [lindex $args 0]]} {
-foreground $COLOR(stdin) \
-background $COLOR(bg) \
-insertbackground $COLOR(cursor) \
- -font $::tkcon::OPT(font) -borderwidth 1 -highlightthickness 0
+ -font $::tkcon::OPT(font) -borderwidth 1 -highlightthickness 0 \
+ -undo 1
catch {
- # 8.4+ stuff
- $w.text configure -undo 1
+ # 8.5+ stuff
+ set tabsp [expr {$OPT(tabspace) * [font measure $OPT(font) 0]}]
+ $w.text configure -tabs [list $tabsp left] -tabstyle wordprocessor
}
+
scrollbar $w.sx -orient h -command [list $w.text xview]
scrollbar $w.sy -orient v -command [list $w.text yview]