none
SELECT LAST ITEM IN LISTBOX RRS feed

  • Question

  • Welcome

    I want to see the last item in the LISTBOX
    Use the following code but select the element before the last

     LIST_ITEM.TopIndex = LIST_ITEM.Items.Count - 1

    Wednesday, August 8, 2018 8:12 AM

Answers

  •  Hi,

    modify the code

     ListBox1.SelectedIndex = ListBox1.Items.Count - 1

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by ahmeddc Wednesday, August 8, 2018 8:39 AM
    Wednesday, August 8, 2018 8:33 AM

All replies

  •  Hi,

    modify the code

     ListBox1.SelectedIndex = ListBox1.Items.Count - 1

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by ahmeddc Wednesday, August 8, 2018 8:39 AM
    Wednesday, August 8, 2018 8:33 AM
  •  Hi,

    modify the code

     ListBox1.SelectedIndex = ListBox1.Items.Count - 1

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thank you
    I did not concentrate much on this

    Wednesday, August 8, 2018 8:39 AM