-
Jan 27th, 2008, 11:29 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Problem with Listview EnsureVisible
Hi, I have a Listview that contains files (their full paths) and I'm uploading them to a server. When I start uploading a file or it has finished, I'm changing the first SubItem and the SmallIcon of that row.
I'd like to make the Listview autoscroll to the file/row that is currently uploading, but every time the SmallIcon is changed the Listview refreshes, scrolls to the top and EnsureVisible is ignored.
I'm using the Listview from Common Controls 5.0.
vb Code:
lvw.ListItems(HoldListIndex(lIndex)).SubItems(1) = "200 - OK!"
lvw.ListItems(HoldListIndex(lIndex)).SmallIcon = 4 'moves scrollbar to top
lvw.ListItems(HoldListIndex(lIndex)).EnsureVisible 'seems to be ignored/bypassed
GetNextFile Index
-
Jan 27th, 2008, 02:14 PM
#2
Re: Problem with Listview EnsureVisible
What if you reverse the order and make ensurevisible the first call?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jan 27th, 2008, 06:21 PM
#3
Thread Starter
Frenzied Member
Re: Problem with Listview EnsureVisible
Unfortunately that doesn't work. The Listview automatically scrolls back to the top every time something is changed in the Listview.
-
Jan 28th, 2008, 12:10 AM
#4
Re: Problem with Listview EnsureVisible
Before Ensure Visible line, what about a to the raw ?
-
Jan 28th, 2008, 03:28 AM
#5
Re: Problem with Listview EnsureVisible
Do you have sorting on or making a call to sort?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Jan 28th, 2008, 01:23 PM
#6
Thread Starter
Frenzied Member
Re: Problem with Listview EnsureVisible
The solution seems to be using ".Selected = True" like Fazi posted above or giving the Listview focus. ".EnsureVisible" works fine then.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|