[wxruby-users] Working with ListCtrl and ListItem

Timo Springmann
Tue, 27 Oct 2009 15:34:33 -0000

Hi Alex,

Am 27.10.2009 um 16:12 schrieb Alex Fenton:
> Timo Springmann wrote:
>> I did some more testing and I''m quite sure that
there''s a bug in
>> wx::ListCtrl and/or in wx::ListItem when using ListCtrl#insert_item
>> to insert a ListItem into a List element.
>
> This has tripped me up before. The wxWidgets default docs are not
> very clear, I will try to remember to update this evening.
>
> insert_item inserts a new row; use set_item to add subsequent
> columns to the same row:

That did the trick. Actually you can use ListCtrl#set_item instead of
ListCtrl#insert_item all the time. Even for the first column you can
use set_item. That''s exactly what I was looking for. Thanks.

Regards,
Timo