Changing display area in ListView
-
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?
-
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?
-
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.
I have tried the following with no result. Not even if i change
new Point(hScrollBar1.Value, listView1.AutoScrollOffset.Y);
tonew Point(250, 1);
How should it be done? this = UserControll listView1 = ListView hScrollBar1 = HScrollBarvoid 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()); }
-
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.
-
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?
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 :)