DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 21 Aug 2007 01:50:06 -0700,    posted on: microsoft.public.dotnet.framework.compactframework        back       

Thread Index
  1    davebythesea
          2    Marc Ambrosius
          3    davebythesea
          4    davebythesea


ListView - Scroll to last item automatically   
Dear List,

I am using the ListView from CompactFramework. I populate the ListView with 
the names of various items I download from the Internet.

As more items are added to the list it eventually reveals its vertical 
scrollbar and the items at the bottom of the list are not visible. Is there a 
way to have the list scroll automatically to the last added item so I can 
visually see what is being added?

Thanks for any suggestions,
Dave
Date:Tue, 21 Aug 2007 01:50:06 -0700   Author:  

Re: ListView - Scroll to last item automatically   
davebythesea wrote:

> As more items are added to the list it eventually reveals its vertical
> scrollbar and the items at the bottom of the list are not visible. Is
> there a way to have the list scroll automatically to the last added
> item so I can visually see what is being added?

Any time you add an item, you can call:
listView.EnsureVisible(listView.Items.Count - 1);

listView.Update();

Marc
Date:Tue, 21 Aug 2007 11:16:23 +0200   Author:  

Re: ListView - Scroll to last item automatically   
"Marc Ambrosius" wrote:


> davebythesea wrote:
> > As more items are added to the list it eventually reveals its vertical
> > scrollbar and the items at the bottom of the list are not visible. Is
> > there a way to have the list scroll automatically to the last added
> > item so I can visually see what is being added?
> Any time you add an item, you can call:
> listView.EnsureVisible(listView.Items.Count - 1);
> 
> listView.Update();
> 
> Marc


Hi Marc,

Thanks very much, I'll try that!

David
Date:Tue, 21 Aug 2007 02:54:01 -0700   Author:  

Re: ListView - Scroll to last item automatically   
Worked nicely, thanks!
Date:Tue, 21 Aug 2007 04:20:00 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us