Multiple Listviews

tsteward

Well-Known 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
 

specci48

Well-Known Member
Licensed User
Hello tsteward,

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

Can I add more than one listview to a form?
Yes!

How do I do this?
Like this:

B4X:
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
How would i referance each listview?
In the example above the listviews are nemed MyListView1 and MyListView2.

Does removing all rows from a listview freeup that memory?
I'm not really sure how .Net handles this. :(


specci48

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

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.
 
Top