473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

listview autoscroll event?

How do i detect that the vertical scroll bar has been
moved and how do i get the vertical scrollbar value from
a listview. I need to do this to synchronise a textbox
movement within the listview.
Nov 15 '05 #1
2 5041
Ashley,

You will have to create a class that derives from ListView. In this
class, you will have to override the WndProc method and process the
WM_VSCROLL or WM_HSCROLL messages. The scrollbars send this to the ListView
in order to indicate that the scroll has been moved.

When processing that message, you can move the other windows
appropriately. Also, you can call the GetScrollInfo API function through
the P/Invoke layer to get the appropriate information about the standard
scroll bars for a window (using the handle for the ListView control).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ashley" <an*******@discussions.microsoft.com> wrote in message
news:56****************************@phx.gbl...
How do i detect that the vertical scroll bar has been
moved and how do i get the vertical scrollbar value from
a listview. I need to do this to synchronise a textbox
movement within the listview.

Nov 15 '05 #2
Thanks Nicholas,

Have you got any code examples. It would help!

Ashley.
-----Original Message-----
Ashley,

You will have to create a class that derives from ListView. In thisclass, you will have to override the WndProc method and process theWM_VSCROLL or WM_HSCROLL messages. The scrollbars send this to the ListViewin order to indicate that the scroll has been moved.

When processing that message, you can move the other windowsappropriately. Also, you can call the GetScrollInfo API function throughthe P/Invoke layer to get the appropriate information about the standardscroll bars for a window (using the handle for the ListView control).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ashley" <an*******@discussions.microsoft.com> wrote in messagenews:56****************************@phx.gbl...
How do i detect that the vertical scroll bar has been
moved and how do i get the vertical scrollbar value from a listview. I need to do this to synchronise a textbox
movement within the listview.

.

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike Ruane-Torr | last post by:
I have a design problem involving a ListView control on a Windows form. What it boils down to is the following question: Q: Is there a way to tell the difference between a ListView.ItemCheck...
0
by: AndyDunning | last post by:
Folks, I'm loading a listview on a form with Vehicle Data for a specified client. I also pass in a specific registration relating to a current client request. The record is displayed and the...
2
by: Mad Joe | last post by:
Hello! Can someone help me, please? It's 6am, I don't have concentration, feel desperate and I have a deadLine for my project (exam at my university).. How can I display ListView onMouse...
0
by: Peter | last post by:
Hi,everyone, I'm using a listview control to deal with data. The ItemCheckEventArgs have 2 properties:CurrentValue and NewValue in listview.itemcheck event. Can anybody tell me when does the...
3
by: Tom Bianchi | last post by:
Hi, I have a Panel with the AutoScroll property set to True and many TextBoxes into it, with only some of them positioned in the visible portion of the panel. Is there a Panel event that I can...
2
by: ian.watkins | last post by:
I'm having a problem with the listview itemcheck event since upgrading a smart device app from VS2003 VB.NET CF1.0 to VS2005 VB.NET CF2.0. I'm using the listview item checkbox to indicate if the...
0
by: eweaver | last post by:
Hello, I have a problem with getting an autoscrollbar to end up where I want it. Things to know about the prob: I have an imagebox inside of a Panel for (inheritance of) autoscroll capabilities....
12
by: Tom Bean | last post by:
I am trying to display a ContextMenuStrip when a user right-clicks on an item in a ListView and have encountered a something that seems strange to me. When the ListView is initially populated,...
0
by: viepia | last post by:
Hi, What is the best way to find the row/column of a System.Windows.Forms.ListView MouseDoubleClick event? Searching the rows and columns for SelectedItems will not work for me, too many...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.