Bwidget Source Code
Check-in [fd83364dae]
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: Added a getbuttonstate function, which retrieves the value of a tag used on a button in the buttonbox.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fd83364dae4f6ec4fe254cb11e1bcb0578f78121
User & Date: ericm 1999-12-14 00:43:35
Context
1999-12-14
20:12
When the selected item is changed, the selection is now set to the entire string. check-in: 5cd9b4a28c user: sven tags: trunk
00:43
* buttonbox.tcl: Added a getbuttonstate function, which retrieves the value of a tag used on a button in the buttonbox. check-in: fd83364dae user: ericm tags: trunk
1999-12-08
15:51
* combobox.tcl: Removed code that cleared entry selection on focus out events, as this crippled exportselection. check-in: 52bc26e2bb user: ericm tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7




1999-12-08  Eric Melski  <[email protected]>

	* combobox.tcl: Removed code that cleared entry selection on focus out 
	events, as this crippled exportselection.

1999-10-29  Eric Melski  <[email protected]>

>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
1998-12-13  Eric Melski  <[email protected]>

	* buttonbox.tcl: Added a getbuttonstate function, which retrieves the value
	of a tag used on a button in the buttonbox.

1999-12-08  Eric Melski  <[email protected]>

	* combobox.tcl: Removed code that cleared entry selection on focus out 
	events, as this crippled exportselection.

1999-10-29  Eric Melski  <[email protected]>

Changes to buttonbox.tcl.

174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
...
202
203
204
205
206
207
208





















209
210
211
212
213
214
215
# ::ButtonBox::setbuttonstate --
#
#	Set the state of a given button tag.  If this makes any buttons
#       enable-able (ie, all of their tags are TRUE), enable them.
#
# Arguments:
#	path        the button box widget name
#       tag         the tag to modify
#       state       the new state of $tag (0 or 1)
#
# Results:
#	None.

proc ::ButtonBox::setbuttonstate {path tag state} {
    variable $path
    upvar 0  $path data
................................................................................
	    }
	    $but configure -state $state
	}
    }
    return
}























# ------------------------------------------------------------------------------
#  Command ButtonBox::itemconfigure
# ------------------------------------------------------------------------------
proc ButtonBox::itemconfigure { path index args } {
    if { [set idx [lsearch $args -default]] != -1 } {
        set args [lreplace $args $idx [expr {$idx+1}]]






|
|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
...
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# ::ButtonBox::setbuttonstate --
#
#	Set the state of a given button tag.  If this makes any buttons
#       enable-able (ie, all of their tags are TRUE), enable them.
#
# Arguments:
#	path        the button box widget name
#	tag         the tag to modify
#	state       the new state of $tag (0 or 1)
#
# Results:
#	None.

proc ::ButtonBox::setbuttonstate {path tag state} {
    variable $path
    upvar 0  $path data
................................................................................
	    }
	    $but configure -state $state
	}
    }
    return
}

# ::ButtonBox::getbuttonstate --
#
#	Retrieve the state of a given button tag.
#
# Arguments:
#	path        the button box widget name
#	tag         the tag to modify
#
# Results:
#	None.

proc ::ButtonBox::getbuttonstate {path tag} {
    variable $path
    upvar 0  $path data
    # First see if this is a real tag
    if { [info exists data(tagstate,$tag)] } {
	return $data(tagstate,$tag)
    } else {
	error "unknown tag $tag"
    }
}

# ------------------------------------------------------------------------------
#  Command ButtonBox::itemconfigure
# ------------------------------------------------------------------------------
proc ButtonBox::itemconfigure { path index args } {
    if { [set idx [lsearch $args -default]] != -1 } {
        set args [lreplace $args $idx [expr {$idx+1}]]