In CF, if a ListBox has more items in its datasource than it can display, it
automatically shows a vertical scroll bar. I have a need to detect when the
scroll bar has been clicked by the user, either stepped by one using the
arrow or stepped by a page-full, causing the list to change. There does not
seem to be any standard ListBox events in CF that let me know when the list
has changed when using the scroll bar. Is there any way I can detect when
either the scroll bar has been clicked or the ListBox listing has changed?
Regards,
Neville Lang
Or write/use a custom list control.
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
"Neville Lang" <neville@MAPS_ONnjlsoftware.com> wrote in message
news:eeqlEBW1...@TK2MSFTNGP14.phx.gbl...
To see scroll actions, create your own Listview:
public class myListView : System.Windows.Forms.ListView
{
protected override void WndProc (ref System.Windows.Forms.Message
m)
{
int WM_VSCROLL = 0x115;
int WM_HSCROLL = 0x114;
if (m.Msg == WM_VSCROLL)
{
// Some code here
break;
}
base.WndProc (ref m);
}
}
Then in "InitializeComponent()" change the line
this.listview = new System.Windows.Forms.ListView();
to
this.listview = new myListView ();
One question for the group?
Every time the form is changed, VisualStudio will overwrite
"InitializeComponent()" and the procedure will have to be re-edited.
Is there a way around this?
Many thanks
Apart from not placing the code in there in the first place or not using the
designer, no.
BTW, did you try the code you just posted in a CF app?
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
"nzpcmad" <nzp...@yahoo.co.uk> wrote in message
news:fbd8029b.04112...@posting.google.com...
Regards,
Neville Lang
"nzpcmad" <nzp...@yahoo.co.uk> wrote in message
news:fbd8029b.04112...@posting.google.com...
Thanks for the clue. I will try it out.
Regards,
Neville Lang
"Daniel Moth" <dmo...@hotmail.com> wrote in message
news:%238NGOoW...@tk2msftngp13.phx.gbl...
Just letting you know that your idea of simply overlaying a new vertical
scroll bar over the one that is created automatically on a ListBox does give
me the indication of when the user taps the scroll bar. Thanks for the clue
on how to get around this problem.
Regards,
Neville Lang
"Neville Lang" <neville@MAPS_ONnjlsoftware.com> wrote in message
news:uuV%23dFb1E...@TK2MSFTNGP15.phx.gbl...
--
Alex Feinman
---
Visit http://www.opennetcf.org
"Neville Lang" <neville@MAPS_ONnjlsoftware.com> wrote in message
news:un5EJjf1...@tk2msftngp13.phx.gbl...
Thank you for your response and file. It has given me some further ideas.
Regards,
Neville Lang
"Alex Feinman [MVP]" <publi...@alexfeinman.com> wrote in message
news:u4MGwGl1...@TK2MSFTNGP14.phx.gbl...
Thank you for your response and file. It has given me some further ideas.
Regards,
Neville Lang
"Alex Feinman [MVP]" <publi...@alexfeinman.com> wrote in message
news:u4MGwGl1...@TK2MSFTNGP14.phx.gbl...