EditableListBox extra item

Hello,

I see in an EditableListBox, there is always one extra item that you can click on, but isn't a real item, in that the edit/delete/up and down arrows are disabled. I guess this is to make it easy to add items by just clicking there, and editing? When this is done, a NEW blank item is now below it. You can test this behavior in the demo.

While this is neat, I guess, when the style is not wx.gizmos.EL_ALLOW_NEW (and not just wx.EL_ALLOW_NEW like the demo would lead you to believe :), I don't feel this item should be there, as users can still add new items as much as they want this way. In the case of not allowing new items, this blank item is there, you can edit it, but when getting the value it isn't there since new items aren't allowed. This could be pretty confusing for users. Is this a bug or am I missing something?

You can duplicate this in the demo for EditableListBox by making the instantiation call:

        self.elb = gizmos.EditableListBox(
                    self, -1, "List of Stuff", (50,50), (250, 250),
                    style=wx.gizmos.EL_ALLOW_EDIT)

Thanks,
Mike

Rooney, Mike (ext. 324) wrote:

Hello,

I see in an EditableListBox, there is always one extra item that you
can click on, but isn't a real item, in that the edit/delete/up and
down arrows are disabled. I guess this is to make it easy to add
items by just clicking there, and editing? When this is done, a NEW
blank item is now below it. You can test this behavior in the demo.

While this is neat, I guess, when the style is not
wx.gizmos.EL_ALLOW_NEW (and not just wx.EL_ALLOW_NEW like the demo
would lead you to believe :), I don't feel this item should be there,
as users can still add new items as much as they want this way. In
the case of not allowing new items, this blank item is there, you can
edit it, but when getting the value it isn't there since new items
aren't allowed. This could be pretty confusing for users. Is this a
bug or am I missing something?

Probably just an overlooked feature :wink: It's been that way for a long time, but I'll take a look at the code.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!