Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Listbox: How to ensure that last item added is visible?

Listbox: How to ensure that last item added is visible?

Scheduled Pinned Locked Moved Managed C++/CLI
tutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jblau
    wrote on last edited by
    #1

    I'm sure this is simple, i'm just not seeing it. I'm not having any luck trying to figure out how to have my listbox autoscroll to the last item in the list when a new item is added.

    B A 2 Replies Last reply
    0
    • J jblau

      I'm sure this is simple, i'm just not seeing it. I'm not having any luck trying to figure out how to have my listbox autoscroll to the last item in the list when a new item is added.

      B Offline
      B Offline
      BAIJUMAX
      wrote on last edited by
      #2

      Hi, if U are Using MFC, check setHotItem(int iIndx) by baijumax

      J 1 Reply Last reply
      0
      • B BAIJUMAX

        Hi, if U are Using MFC, check setHotItem(int iIndx) by baijumax

        J Offline
        J Offline
        jblau
        wrote on last edited by
        #3

        I am using Visual Studio.net 2003; and I don't see anything that looks like setHotItem. ???

        1 Reply Last reply
        0
        • J jblau

          I'm sure this is simple, i'm just not seeing it. I'm not having any luck trying to figure out how to have my listbox autoscroll to the last item in the list when a new item is added.

          A Offline
          A Offline
          AnsGe
          wrote on last edited by
          #4

          Hai, u can simply solve the problem by selecting the last item. ie this->listBox1->SelectedIndex=this->listBox1->Items->Count-1;; ANish

          J 1 Reply Last reply
          0
          • A AnsGe

            Hai, u can simply solve the problem by selecting the last item. ie this->listBox1->SelectedIndex=this->listBox1->Items->Count-1;; ANish

            J Offline
            J Offline
            jblau
            wrote on last edited by
            #5

            Thanks!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups