Results 1 to 3 of 3

Thread: Need help saving listview contents, clearing listview then reloading listview.

  1. #1
    Addicted Member
    Join Date
    Aug 11
    Posts
    200

    Need help saving listview contents, clearing listview then reloading listview.

    As the title says this is basically my problem. In my application I have a feature to add breakpoints/bookmarks in the textbox that the user is inputting information into. As they add the breakpoint it adds the line number that the item is on and also the contents of the line to a listview. Line number in first column line content in second column. That works great the only problem is that I added multiple document capabilities to the application so I need to find a way to be able to display the breakpoints of only the current document in the listview, then if the user switches to another document it will display only the breakpoints in that document.

    I thought of somehow creating a my.settings property name dynamically for the name of the document then adding each breakpoint to the properties as they are added to the document. Then have have it clear the listview when the document tab is changed and load the bookmark properties for the corresponding document.

    I also thought about adding these to a list/array and calling it on tab change or even adding the items to the tabs .tag property. Although I still don't know the best way to pursue this. It is possible that I am over thinking and there is an even easier way. I hope someone can help. Thanks.

  2. #2
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 12
    Posts
    5,546

    Re: Need help saving listview contents, clearing listview then reloading listview.

    See! This is what happens when you use display components as data stores! Hint:

    Dim l As List(Of ListViewItem) = New List(Of ListViewItem)

  3. #3
    Addicted Member
    Join Date
    Aug 11
    Posts
    200

    Re: Need help saving listview contents, clearing listview then reloading listview.

    Lol, well lesson learned. Thanks Dun. Im going to use your hint after I eat dinner. Ill keep you posted.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •