From: Marcus <li...@wo...> - 2002-05-30 07:54:32
|
I'm having trouble with two listbox methods. The listbox is set to multiple (or extended), and I'm trying to use Delete(). The index numbers returned seem unpredictable. With 3 items it may return 0,6, 225464... Also, if I select multiple items, they all have the same id. Here's the code: my (@selections) = GetListbox($this)->GetSelections(); my $item; foreach $item (@selections) { print "item to delete:$item\n"; GetListbox($this)->Delete($item); } 2) Wx::Listbox::Number seems to be unknown. I tried declaring use Wx::Listbox specifically (although it didn't make sense). It doesn't know the method though. I tried: my $number_items = GetListbox($this)->Number(); Is syntax not correct? Other methods such as GetString() work fine. Thanks, Marcus |
From: Mattia B. <mb...@ds...> - 2002-05-30 09:16:13
|
On Thu, 30 May 2002, Marcus wrote: > >I'm having trouble with two listbox methods. > I'll reply separately to the first problems. >2) Wx::Listbox::Number seems to be unknown. I tried declaring use AFAIR it is deprecated. Try looking for GetCount or GetItemCount. ( warning, I am recalling from memory, I don't have the docs here ). Regards Mattia |