Bwidget Source Code
Check-in [420c4a35b6]
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.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:* buttonbox.tcl: Fixed ButtonBox::add input list, as the change I made to allow tagging was not backwards compatible. Now tags are specified with -tags $tags, and all is well.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 420c4a35b662196c24cf5191df09489ea62a0903
User & Date: ericm 1999-09-21 17:22:04
Context
1999-09-21
17:26
ChangeLog commit. check-in: d4865f7d47 user: ericm tags: trunk, scriptics-bc-1-0-b1
17:22
* buttonbox.tcl: Fixed ButtonBox::add input list, as the change I made to allow tagging was not backwards compatible. Now tags are specified with -tags $tags, and all is well. check-in: 420c4a35b6 user: ericm tags: trunk
01:50
Implemented the new configuration option -side, which allows the selection of the side for the notebook tabs. Possible values are "top" and "bottom". check-in: 5afb5e2005 user: sven tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to buttonbox.tcl.

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116








117
118
119
120
121
122
123
    return [Widget::cget $path $option]
}


# ------------------------------------------------------------------------------
#  Command ButtonBox::add
# ------------------------------------------------------------------------------
proc ButtonBox::add { path tags args } {
    variable $path
    upvar 0  $path data

    set but     $path.b$data(nbuttons)
    set spacing [Widget::getoption $path -spacing]

    if { $data(nbuttons) == $data(default) } {
        set style active
    } elseif { $data(default) == -1 } {
        set style disabled
    } else {
        set style normal
    }









    eval Button::create $but \
        -background [Widget::getoption $path -background]\
        -padx       [Widget::getoption $path -padx] \
        -pady       [Widget::getoption $path -pady] \
        $args \
        -default $style






|













>
>
>
>
>
>
>
>







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
    return [Widget::cget $path $option]
}


# ------------------------------------------------------------------------------
#  Command ButtonBox::add
# ------------------------------------------------------------------------------
proc ButtonBox::add { path args } {
    variable $path
    upvar 0  $path data

    set but     $path.b$data(nbuttons)
    set spacing [Widget::getoption $path -spacing]

    if { $data(nbuttons) == $data(default) } {
        set style active
    } elseif { $data(default) == -1 } {
        set style disabled
    } else {
        set style normal
    }

    array set flags $args
    set tags ""
    if { [info exists flags(-tags)] } {
	set tags $flags(-tags)
	unset flags(-tags)
	set args [array get flags]
    }

    eval Button::create $but \
        -background [Widget::getoption $path -background]\
        -padx       [Widget::getoption $path -padx] \
        -pady       [Widget::getoption $path -pady] \
        $args \
        -default $style