Results 1 to 9 of 9

Thread: Adding Items to Multi-Columned Listboxes

  1. #1

    Thread Starter
    Member <-ShORe->'s Avatar
    Join Date
    Jul 2004
    Location
    Sudbury, Ontario
    Posts
    55

    Adding Items to Multi-Columned Listboxes

    How do I do it? It's for a bookmark system.. also if you know how can someone show me how to save the contents of one session of the program (so the bookmarks are still there the next time it's started)

  2. #2
    Lively Member
    Join Date
    Aug 2003
    Location
    Philadelphia, Pa.
    Posts
    123
    to add entries to a multi-colum listbox, use VbTab as a delimeter.

    Code:
    List1.AddItem "Your Information" & VbTab & "More Information"

  3. #3

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    yeah martin is right... first of all using vbTab is a bad idea because if one string is long and another is short in the first column, your tabs wont line up anyway

    use the listview which is part of Microsoft Windows Common Controls (component you must reference) and set it to reportview for a multiline listing (same look as a peer-to-peer filesharing program if you have ever seen one of those)

  5. #5

    Thread Starter
    Member <-ShORe->'s Avatar
    Join Date
    Jul 2004
    Location
    Sudbury, Ontario
    Posts
    55
    thanks kleinma, was looking for a microsoft listview control

    ListView is the one that allows you to have small icons beside each item I'm guessing ? how do you add columns to a listview, and how do you add items ? it doesn't look as straightforward as a ListBox

  6. #6

  7. #7
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    its not as straight forward, but on the otherhand does about a million things more than the listbox.. use martins example to get familiar with it, and then post if you have any specific questions

  8. #8

    Thread Starter
    Member <-ShORe->'s Avatar
    Join Date
    Jul 2004
    Location
    Sudbury, Ontario
    Posts
    55
    Got everything working fine, learned alot from that file Martin Now on to my other question

    also if you know how can someone show me how to save the contents of one session of the program (so the bookmarks are still there the next time it's started)

  9. #9
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    It depends on what you want to save. If you just want to save a few of the user's choices and/or things like values in textboxes the click the GetSetting link in my signature. If you have a lot of data to save then a database is probably what you want to use. You could also write it out to a text file and read it back in the next time.

Posting Permissions

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



Click Here to Expand Forum to Full Width