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. C#
  4. Changing display area in ListView

Changing display area in ListView

Scheduled Pinned Locked Moved C#
csharpcsshelpquestion
5 Posts 2 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.
  • F Offline
    F Offline
    Flow84
    wrote on last edited by
    #1

    Hi. Im doing a VirtualListView using 1 ListView, 1 VScrollBar and 1 HScrollBar. Where im just adding items that can actually be showed. This so it goes way much faster and has much less flicker when adding 58000 items one by one. (Has to be done this way as there is no way to know how many items that should be added or when it is finished, reading items from stream). My problem is not to Scroll down/up with VScrollBar but to scroll to see other columns with HScrollBar. In picture below A and C is my VirtualListView and B is standard ListView from .net. As you can see my VirtualListView:s are not showing correct display area. VirtualListView.png How can this be done?

    V F 2 Replies Last reply
    0
    • F Flow84

      Hi. Im doing a VirtualListView using 1 ListView, 1 VScrollBar and 1 HScrollBar. Where im just adding items that can actually be showed. This so it goes way much faster and has much less flicker when adding 58000 items one by one. (Has to be done this way as there is no way to know how many items that should be added or when it is finished, reading items from stream). My problem is not to Scroll down/up with VScrollBar but to scroll to see other columns with HScrollBar. In picture below A and C is my VirtualListView and B is standard ListView from .net. As you can see my VirtualListView:s are not showing correct display area. VirtualListView.png How can this be done?

      V Offline
      V Offline
      VSush
      wrote on last edited by
      #2

      I am not sure I quite understood your question but if you have derived your listview from the standard .net listview, you can use the Autoscroll property of the listview. This would by itself display the correct area.

      F 2 Replies Last reply
      0
      • V VSush

        I am not sure I quite understood your question but if you have derived your listview from the standard .net listview, you can use the Autoscroll property of the listview. This would by itself display the correct area.

        F Offline
        F Offline
        Flow84
        wrote on last edited by
        #3

        I have tried the following with no result. Not even if i change new Point(hScrollBar1.Value, listView1.AutoScrollOffset.Y); to new Point(250, 1); How should it be done? this = UserControll listView1 = ListView hScrollBar1 = HScrollBar void hScrollBar1_ValueChanged(object sender, EventArgs e) { Console.WriteLine("listView1.AutoScrollOffset: " + listView1.AutoScrollOffset.ToString()); listView1.AutoScrollOffset = new Point(hScrollBar1.Value, listView1.AutoScrollOffset.Y); this.ScrollControlIntoView(listView1); Console.WriteLine("listView1.AutoScrollOffset: " + listView1.AutoScrollOffset.ToString()); }

        1 Reply Last reply
        0
        • V VSush

          I am not sure I quite understood your question but if you have derived your listview from the standard .net listview, you can use the Autoscroll property of the listview. This would by itself display the correct area.

          F Offline
          F Offline
          Flow84
          wrote on last edited by
          #4

          no one?

          1 Reply Last reply
          0
          • F Flow84

            Hi. Im doing a VirtualListView using 1 ListView, 1 VScrollBar and 1 HScrollBar. Where im just adding items that can actually be showed. This so it goes way much faster and has much less flicker when adding 58000 items one by one. (Has to be done this way as there is no way to know how many items that should be added or when it is finished, reading items from stream). My problem is not to Scroll down/up with VScrollBar but to scroll to see other columns with HScrollBar. In picture below A and C is my VirtualListView and B is standard ListView from .net. As you can see my VirtualListView:s are not showing correct display area. VirtualListView.png How can this be done?

            F Offline
            F Offline
            Flow84
            wrote on last edited by
            #5

            Im writing this so if anyone else search for it they will find my solution. I have done a walk around for this problem. By using the inbuilt Scrollers and just having one VScrollBar over the region the default one should be. all works good. hope someone see this as usefull :)

            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