Results 1 to 5 of 5

Thread: ListBox Question

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2004
    Location
    Bracebridge
    Posts
    20

    ListBox Question

    I've got a really nice listbox working, and I'm using it to enter answers from a T/F test. As I enter each answer, it becomes visible in the listbox. Once the items reach the bottom of the box though, the answers that I enter are no longer visible (they are below the bottom of the listbox). They are there, but you need to use the scroll bar to view them.

    Is there any way that I can make it so that the most recently entered item is visible at the bottom of the Listbox?

    Ian

  2. #2
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    VB Code:
    1. ListBox1.SelectedIndex = ListBox1.Items.Count - 1

    put this after to add a item to the list box
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  3. #3
    Frenzied Member <ABX's Avatar
    Join Date
    Jul 2002
    Location
    Canada eh...
    Posts
    1,622
    EDIT: Damn Double Post
    Last edited by <ABX; Jun 20th, 2004 at 03:21 AM.
    Tips:
    • Google is your friend! Search before posting!
    • Name your thread appropriately... "I Need Help" doesn't cut it!
    • Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
    • Allways Include the Name and Line of the Exception (if one is occuring!)
    • If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)


    If you think I was helpful, rate my post
    IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Location
    Bristol, England (but heart is in Virginia)
    Posts
    2,949
    Originally posted by <ABX
    EDIT: Damn Double Post
    When you edit your double post you CAN delete it entirely using the two boxes at the top
    Last edited by taxes; Jun 20th, 2004 at 07:56 AM.
    Taxes
    The more I learn about VB.NET the more I like dBaseIII Plus

    The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jun 2004
    Location
    Bracebridge
    Posts
    20

    It works!!!

    Thanks! The code line worked like a charm - and what's more, it helped me learn a lot about this language.

    Thanks again!

    Ian

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