Multiple Listviews

Discussion in 'Questions (Windows Mobile)' started by tsteward, Apr 20, 2008.

  1. tsteward

    tsteward Active Member Licensed User

    Hi everyone, I am new to basic4ppc and loving it so far. :sign0060:
    I am considering changing my Tables to Listviews.

    :sign0085::sign0104:
    Can I add more than one listview to a form?

    How do I do this?

    How would i referance each listview?

    Does removing all rows from a listview freeup that memory?

    Thanks
    Tony
     
  2. specci48

    specci48 Well-Known Member Licensed User

    Hello tsteward,

    welcome to basic4ppc! :)
    Some quick (but helpful) answers to your questions:

    Yes!

    Like this:

    Code:
    Sub Globals
    End Sub

    Sub App_Start
        Form1.Show
       
        AddObject(
    "MyListView1","ListView")   
        AddObject(
    "MyListView2","ListView")            
        MyListView1.New1(
    "Form1",5,5,100,140
        MyListView2.New1(
    "Form1",120,5,100,140)    
       
    End Sub
    In the example above the listviews are nemed MyListView1 and MyListView2.

    I'm not really sure how .Net handles this. :(


    specci48

    P.S.: The last question is a typical for Erel and agraham... ;)
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    I recommend you to add the objects with Tools - Add Object.
    That way the IDE will be able to help you with the list of methods.

    Fillipo wrote the ListView library so he is the real expert, however AFAIK removing the rows will free that memory.
    Generally speaking in most cases the .Net Framework will take care of releasing unused allocated memory.
     
Loading...