[Gambas-user] listview equivalent of listbox.list

Dimitris Anogiatis dosida at ...626...
Fri May 22 21:48:42 CEST 2009


Hey joshua,

I think listbox can do what listview.current.delete does.

Try this

      ListBox1.Remove(ListBox1.Find(ListBox1.Text))

this will find the index number of whatever item is currently selected
and the item with that index number will be removed

as for enumerating a listbox a simple for loop will do. Try this

    FOR iterator = 0 TO ListBox1.Count - 1
      PRINT ListBox1.List[iterator]
    NEXT

So you can switch to listboxes unless there's a specific feature of
listviews you need

Hope this helps
Regards
Dimitris

On Fri, May 22, 2009 at 1:01 PM, Joshua Higgins
<joshiggins at ...1601...>wrote:

> Hi,
>
> I want to use the contents of a listview with a FOR EACH statement. Is
> there
> an equivalent of ListBox.List, to return the array?
>
> I would use list boxes, but I need the ListView.Current.Delete function,
> which the listbox seems to lack.
>
> Thanks.
>
> --
> joshua higgins
> >>>>>>------
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list