Results 1 to 4 of 4

Thread: [RESOLVED] [2008] Listbox help

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2008
    Location
    Dominican Republic
    Posts
    733

    Resolved [RESOLVED] [2008] Listbox help

    How can i change the order that the items are added into the listbox?

    This is the original order:

    1st post
    2nd post
    3rd post

    And i want to be this way:

    3rd post
    2nd post
    1st post

    And so on... What i want to do, in other words, is for the newest added item to be at the top of the list.

    Thanks agaiin

  2. #2
    Frenzied Member toecutter's Avatar
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Posts
    1,160

    Re: [2008] Listbox help

    is the listbox's property set to sort? can we see the code?

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: [2008] Listbox help

    Call the Insert method instead of the Add method and specify 0 as the index to insert at.

    That assumes that you're adding these items manually in code.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2008
    Location
    Dominican Republic
    Posts
    733

    Re: [2008] Listbox help

    Thanks, got it! It worked =D

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