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