L
Lord Zoltar
Hello,
I'm trying to force a listView to scroll to some location when a
certain button is clicked on. I've found that the SendMessage function
seems to be the choice way of doing it. Here's what I've put in my
button handler:
//somewhere else in my code:
private const int WM_VSCROLL = 277; // Vertical scroll
..
..
..
//inside button click handler:
SendMessage(myListView.Handle,WM_VSCROLL,IntPtr.Zero,
(IntPtr)scrollAmt);
The application compiles and runs fine, and when I click on the scroll
button, the method is invoked (I stepped through in the debugger), but
the listview never scrolls to scrollAmt.
I think I may be using SendMessage incorrectly, but I just can't
figure out how.
Can anyone help with this?
I'm trying to force a listView to scroll to some location when a
certain button is clicked on. I've found that the SendMessage function
seems to be the choice way of doing it. Here's what I've put in my
button handler:
//somewhere else in my code:
private const int WM_VSCROLL = 277; // Vertical scroll
..
..
..
//inside button click handler:
SendMessage(myListView.Handle,WM_VSCROLL,IntPtr.Zero,
(IntPtr)scrollAmt);
The application compiles and runs fine, and when I click on the scroll
button, the method is invoked (I stepped through in the debugger), but
the listview never scrolls to scrollAmt.
I think I may be using SendMessage incorrectly, but I just can't
figure out how.
Can anyone help with this?