|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
List View questionI have a listview box in detail view with 100+ items. I can select the
50th item by lstdetail.items(49).selected=true. But, when I do that the item is selected, but the listview box hasn't scrolled down to where that line item is. How do I get the listview box to scroll down to the selected items. Darin *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! Darin,
The listview control has an EnsureVisible method that should do what you need. Kerry Moorman Show quoteHide quote "Darin" wrote: > I have a listview box in detail view with 100+ items. I can select the > 50th item by lstdetail.items(49).selected=true. But, when I do that the > item is selected, but the listview box hasn't scrolled down to where > that line item is. > > How do I get the listview box to scroll down to the selected items. > > Darin > > *** Sent via Developersdex http://www.developersdex.com *** > Don't just participate in USENET...get rewarded for it! > THanks - that worked great.
Darin *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! In addition to this, when the 50th element is selected, that is fine,
but the first element still has a box around it. So, if I select the 50th programmatically, then, when running the program, hit the down arrow, it moves from element 1 to element 2, even though 50 was selected. I need to somehow completely un-select the first element. My listview has the following properties: Me.lstCode.FullRowSelect = True Me.lstCode.Location = New System.Drawing.Point(8, 80) Me.lstCode.MultiSelect = False Me.lstCode.Name = "lstCode" Me.lstCode.Size = New System.Drawing.Size(744, 208) Me.lstCode.TabIndex = 10 Me.lstCode.View = System.Windows.Forms.View.Details Darin *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
How to Print PRN file
InStr Time Critical Process in .NET Converting MS Access 2000 application to a VB / VB.NET application How to Prevent Flicker when Updating ListView Form that slides up into view (MSN Style) AddHandler RemoveHandler Question date problem in datagrid Error on break Print the content of a listview |
|||||||||||||||||||||||