Bwidget Source Code
Check-in [8d829980cc]
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:listbox.tcl ListBox::selection Only redraw if selection changed. Patch by Wolfgang S. Kechel [Bug 3517145]
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA1: 8d829980cc9c479a4ca892ea1377436427c7bf8c
User & Date: oehhar 2012-04-12 12:46:47
Context
2012-07-27
11:47
2012-07-27 [email protected] BWidget 1.9.6 tagged check-in: d596cecffe user: oehhar tags: bwidget, bwidget-1-9-6
2012-04-12
12:46
listbox.tcl ListBox::selection Only redraw if selection changed. Patch by Wolfgang S. Kechel [Bug 3517145] check-in: 8d829980cc user: oehhar tags: bwidget
2012-04-02
09:53
* entry.tcl, BWMan/entry.tcl checkbox.tcl Themed mode: Invoking "configure" without arguments results in errors that non-ttk options are not present. Removed Entry options: -background -foreground -relief -borderwidth -fg -bg -bd. Reported by Wolfgang S. Kechel [Bug 3513263] * entry.tcl mapped entry option -state to ttk::entry state in themed mode to make state change visible. check-in: 2c3d9d4c82 user: oehhar tags: bwidget
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7




2012-04-02 Harald Oehlmann <[email protected]>

	* entry.tcl, BWMan/entry.tcl checkbox.tcl Themed mode:
	Invoking "configure" without arguments results in errors
	that non-ttk options are not present.
	Removed Entry options: -background -foreground -relief
	-borderwidth -fg -bg -bd. Reported by Wolfgang S. Kechel
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2012-04-12 Harald Oehlmann <[email protected]>

	* listbox.tcl ListBox::selection Only redraw if
	selection changed. Patch by Wolfgang S. Kechel [Bug 3517145]

2012-04-02 Harald Oehlmann <[email protected]>

	* entry.tcl, BWMan/entry.tcl checkbox.tcl Themed mode:
	Invoking "configure" without arguments results in errors
	that non-ttk options are not present.
	Removed Entry options: -background -foreground -relief
	-borderwidth -fg -bg -bd. Reported by Wolfgang S. Kechel

Changes to listbox.tcl.

1
2
3
4
5
6
7
8
9
10
11
...
564
565
566
567
568
569
570

571
572
573
574
575
576
577
...
604
605
606
607
608
609
610
611

612


613
614
615
616
617
618
619
# ----------------------------------------------------------------------------
#  listbox.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: listbox.tcl,v 1.29.2.6 2011/06/23 09:17:19 oehhar Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#     - ListBox::create
#     - ListBox::configure
#     - ListBox::cget
#     - ListBox::insert
#     - ListBox::itemconfigure
................................................................................
# ----------------------------------------------------------------------------
#  Command ListBox::selection
# ----------------------------------------------------------------------------
proc ListBox::selection { path cmd args } {
    variable $path
    upvar 0  $path data


    switch -- $cmd {
        set {
            set data(selitems) {}
            foreach item $args {
                if { [lsearch -exact $data(selitems) $item] == -1 } {
                    if { [lsearch -exact $data(items) $item] != -1 } {
                        lappend data(selitems) $item
................................................................................
        includes {
            return [expr {[lsearch -exact $data(selitems) $args] != -1}]
        }
        default {
            return
        }
    }


    _redraw_idle $path 1


}


# ----------------------------------------------------------------------------
#  Command ListBox::exists
# ----------------------------------------------------------------------------
proc ListBox::exists { path item } {


|







 







>







 







<
>
|
>
>







1
2
3
4
5
6
7
8
9
10
11
...
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
...
605
606
607
608
609
610
611

612
613
614
615
616
617
618
619
620
621
622
# ----------------------------------------------------------------------------
#  listbox.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: listbox.tcl,v 1.29.2.7 2012/04/12 12:46:47 oehhar Exp $
# ----------------------------------------------------------------------------
#  Index of commands:
#     - ListBox::create
#     - ListBox::configure
#     - ListBox::cget
#     - ListBox::insert
#     - ListBox::itemconfigure
................................................................................
# ----------------------------------------------------------------------------
#  Command ListBox::selection
# ----------------------------------------------------------------------------
proc ListBox::selection { path cmd args } {
    variable $path
    upvar 0  $path data

    set oldsel $data(selitems);
    switch -- $cmd {
        set {
            set data(selitems) {}
            foreach item $args {
                if { [lsearch -exact $data(selitems) $item] == -1 } {
                    if { [lsearch -exact $data(items) $item] != -1 } {
                        lappend data(selitems) $item
................................................................................
        includes {
            return [expr {[lsearch -exact $data(selitems) $args] != -1}]
        }
        default {
            return
        }
    }

    if {[string compare $oldsel $data(selitems)]} {
        _redraw_idle $path 1
    }
    return;
}


# ----------------------------------------------------------------------------
#  Command ListBox::exists
# ----------------------------------------------------------------------------
proc ListBox::exists { path item } {