Menu

#1 selectionbox option -itemsontop t/f

open
nobody
None
5
2007-02-13
2007-02-13
Anonymous
No

Normally the selectionbox is created with the listbox over the entry. This option would allow the other order to be used. No change to existing appearance or functionality.

small changes

# addition to class
itk_option define -itemsontop itemsOnTop ItemsOnTop true

# ------------------------------------------------------------------
# OPTION: -itemsontop
#
# Specifies items over selection, otherwise opposite
# ------------------------------------------------------------------
itcl::configbody iwidgets::dSelectionbox::itemsontop {
_packComponents
}

# and the rest are changes to _packComponents
# before the switch

if {$itk_option(-itemsontop)} {
set top "items"
set bottom "selection"
} else {
set top "selection"
set bottom "items"
}

# and each of the switch sections now has the
# the explicit placements replaced with parameterized
# ones
n {
grid $itk_component(sbchildsite) -row 0 -column 0 \ -sticky nsew -rowspan 1
grid $itk_component($top) -row 1 -column 0 -sticky nsew
grid $itk_component($bottom) -row 3 -column 0 -sticky ew

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.