Bwidget Source Code
Check-in [40b8a7276c]
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:Fixed a small scrollbar width issue introduced by merge of Boudillier's code.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 40b8a7276c9e13d9a4f868e5423f376e572443d7
User & Date: ericm 2000-02-23 00:32:31
Context
2000-02-23
18:54
Replaced bwinclude ... "" with bwinclude ... :cmd, so that the reverse mapping from subwidget -> megawidget options works right. check-in: 7bc7bd2db4 user: ericm tags: trunk
00:32
Fixed a small scrollbar width issue introduced by merge of Boudillier's code. check-in: 40b8a7276c user: ericm tags: trunk
2000-02-19
02:12
* images/target.xbm: Placeholder for actual icon.

* color.tcl: Change env(BWIDGET_LIBRARY) to ::BWIDGET::LIBRARY; changed proc "dialogue" to "dialog"

* pkgIndex.tcl: Updated function spec for color.tcl.

* widget.tcl: Various minor speed tweaks; added a reverse mapping from component widget options -> mega-widget options so that subcget can be faster.

* entry.tcl: * dropsite.tcl: * dragsite.tcl: * arrow.tcl: Tcl list'd the specs for Widget::declare calls.

* combobox.tcl: Removed extraneous ListBox::use call. check-in: 25c5681556 user: ericm tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to combobox.tcl.

1
2
3
4
5
6
7
8
9
10
11
...
237
238
239
240
241
242
243





244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
...
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# ------------------------------------------------------------------------------
#  combobox.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: combobox.tcl,v 1.6 2000/02/19 02:12:40 ericm Exp $
# ------------------------------------------------------------------------------
#  Index of commands:
#     - ComboBox::create
#     - ComboBox::configure
#     - ComboBox::cget
#     - ComboBox::setvalue
#     - ComboBox::getvalue
................................................................................
        if { $len < 3 } {
            set h 3
        } elseif { $len > 10 } {
            set h 10
        } else {
            set h $len
        }





    }
    if {![winfo exists $path.shell]} {
        set shell [toplevel $path.shell -relief sunken -bd 2]
        wm overrideredirect $shell 1
        wm transient $shell [winfo toplevel $path]
        wm withdraw  $shell

        set sw     [ScrolledWindow $shell.sw -managed 0 -size 11 -ipad 0]
        set listb  [listbox $shell.listb \
                        -relief flat -borderwidth 0 -highlightthickness 0 \
                        -exportselection false \
                        -font   [Widget::getoption $path -font]  \
                        -height $h]
        pack $sw -fill both -expand yes
        $sw setwidget $listb
................................................................................

        ::bind $listb <ButtonRelease-1> "ComboBox::_select $path @%x,%y"
        ::bind $listb <Return>          "ComboBox::_select $path active; break"
        ::bind $listb <Escape>          "ComboBox::_unmapliste $path; break"
    } else {
        set listb $shell.listb
        destroy $shell.sw
        set sw [ScrolledWindow $shell.sw -managed 0 -size 11 -ipad 0]
        $listb configure -height $h -font [Widget::getoption $path -font]
        pack $sw -fill both -expand yes
        $sw setwidget $listb
        raise $listb
        _update_listbox $path 0
    }
}


|







 







>
>
>
>
>







|







 







|







1
2
3
4
5
6
7
8
9
10
11
...
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
...
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# ------------------------------------------------------------------------------
#  combobox.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: combobox.tcl,v 1.7 2000/02/23 00:32:31 ericm Exp $
# ------------------------------------------------------------------------------
#  Index of commands:
#     - ComboBox::create
#     - ComboBox::configure
#     - ComboBox::cget
#     - ComboBox::setvalue
#     - ComboBox::getvalue
................................................................................
        if { $len < 3 } {
            set h 3
        } elseif { $len > 10 } {
            set h 10
        } else {
            set h $len
        }
    }
    if { $::tcl_platform(platform) == "unix" } {
	set sbwidth 11
    } else {
	set sbwidth 15
    }
    if {![winfo exists $path.shell]} {
        set shell [toplevel $path.shell -relief sunken -bd 2]
        wm overrideredirect $shell 1
        wm transient $shell [winfo toplevel $path]
        wm withdraw  $shell

        set sw     [ScrolledWindow $shell.sw -managed 0 -size $sbwidth -ipad 0]
        set listb  [listbox $shell.listb \
                        -relief flat -borderwidth 0 -highlightthickness 0 \
                        -exportselection false \
                        -font   [Widget::getoption $path -font]  \
                        -height $h]
        pack $sw -fill both -expand yes
        $sw setwidget $listb
................................................................................

        ::bind $listb <ButtonRelease-1> "ComboBox::_select $path @%x,%y"
        ::bind $listb <Return>          "ComboBox::_select $path active; break"
        ::bind $listb <Escape>          "ComboBox::_unmapliste $path; break"
    } else {
        set listb $shell.listb
        destroy $shell.sw
        set sw [ScrolledWindow $shell.sw -managed 0 -size $sbwidth -ipad 0]
        $listb configure -height $h -font [Widget::getoption $path -font]
        pack $sw -fill both -expand yes
        $sw setwidget $listb
        raise $listb
        _update_listbox $path 0
    }
}