> i have in a ListBox the next values > > index0, 1 > index1, 11 > index2, 111 > index3, 1111 > index4, 11 > > i want to multiple select values and able to delete them. > > to do this i use lstBox.Find() to get the selected index from > lstBox[i].Text > > But Find returns the first value which is found and if i select the > index 4, "ii" is not possible to delete. Instead it is deleted the index > 1, according to Find. > > If the .ListBoxItem could return the Key of item this could be possible > something like that > > > lstBox.Remove(lstBox[i].Index) > > So in above example i could delete values index3=1111, index4=11 > and not index3=1111, index1=11 > > Is it possible the .ListBoxItem return the index? > I tell this if it could be add to wish-list.
In ListBox, Index is not absolute, but relative. If you delete an item, the index changes. If you want an absolute index, use a ListView instead. Regards, -- Benoît Minisini ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
