Bwidget Source Code
Check-in [8d829980cc]
Not logged in

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]
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA1: 8d829980cc9c479a4ca892ea1377436427c7bf8c
User & Date: oehhar 2012-04-12 12:46:47.000
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
Unified Diff 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
# ----------------------------------------------------------------------------
#  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



|







1
2
3
4
5
6
7
8
9
10
11
# ----------------------------------------------------------------------------
#  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
564
565
566
567
568
569
570

571
572
573
574
575
576
577
# ----------------------------------------------------------------------------
#  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







>







564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# ----------------------------------------------------------------------------
#  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
604
605
606
607
608
609
610
611
612


613
614
615
616
617
618
619
        includes {
            return [expr {[lsearch -exact $data(selitems) $args] != -1}]
        }
        default {
            return
        }
    }

    _redraw_idle $path 1


}


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







|
|
>
>







605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
        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 } {