ListSelect has extra blank row at top. Bug or feature?

If you pass TRUE to the “setNullSelectionAllowed” method on a ListSelect instance, an extra row is added to the top of the list. The empty row is selectable by the user.

Note that TRUE is the default, so this problem happens to a ListSelect by default.

If you pass “FALSE”, the extra blank row is not drawn.

This is a bug, correct? Is there any workaround?

Here’s a
screen shot
.

I posted this
bug report
including 2 files with simple code to make an example app, drawn from the Sampler demo.

–Basil Bourque

Feature, maybe? Quick way to unselect is to pick the empty line?

If so, I’ve never seen that convention on any platform. Other platforms allow a null selection either by

• Clicking below the list’s items (in white space below last item)

• Modified click (such as pressing Command key “⌘” on a Mac)

I am trying to use ListSelect instances in an Accordion as a navigation panel. Imagine the user going through a set of slide show or flash cards. So only one of the multiple ListSelect instances should have an item selected at any one time, corresponding to the particular slide or flash card currently on screen.

Is there some way to suppress that blank row?

Or some other way to build a navigation panel?

All I really need is list of selectable items separated into groups by a non-selectable grouping-label.

–Basil Bourque

Hello,

I have the same strange feature happens on my Select. Did you found a way to remove that empty item in your Select?

Thank

Okay I found it: setNullSelectionAllowed(false)