Bwidget Source Code
Artifact Content
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Artifact 2210b2d16c8bf6f86f233fda544b5964b6f5d979:


if { $tcl_platform(platform) == "windows" } {
    option add *Listbox.background      SystemWindow widgetDefault
    option add *ListBox.background      SystemWindow widgetDefault
    option add *Button.padY             0 widgetDefault
    option add *ButtonBox.padY          0 widgetDefault
    option add *Dialog.padY             0 widgetDefault
    option add *Dialog.anchor           e widgetDefault
} else { 
    option add *Scrollbar.width         12 widgetDefault
    option add *Scrollbar.borderWidth   1  widgetDefault
    option add *Dialog.separator        1  widgetDefault
    option add *MainFrame.relief        raised widgetDefault
    option add *MainFrame.separator     none   widgetDefault
}

option read [file join $::BWIDGET::LIBRARY "lang" "en.rc"]

bind Entry <<TraverseIn>> { %W selection range 0 end ; %W icursor end }

namespace eval Widget {}

proc Widget::traverseTo {w} {
    if {[set oldfocus [focus]] != ""} {
    	event generate $oldfocus <<TraverseOut>>
    }
    focus $w 
    event generate $w <<TraverseIn>> 
}

bind all <Key-Tab>       {Widget::traverseTo [Widget::focusNext %W]}
bind all <Shift-Key-Tab> {Widget::traverseTo [Widget::focusPrev %W]}