473,466 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ListView Autoscroll

Folks,

I'm loading a listview on a form with Vehicle Data for a specified client. I
also pass in a specific registration relating to a current client request.
The record is displayed and the corresponding record in the listview appears
selected.

The problem I have is that if the number of records loaded in the listview
can't all be displayed at once the listview won't auto scroll to display the
selected record, the user would have to scroll the listview.

Does anyone know a way of autoscrolling a listview control to display the
selected record.

Thanks

Andy

Dim i As Integer
Dim iChars As Integer
iChars = Len(sReg)
For i = 0 To dlvVehicles.Items.Count - 1
If Mid(dlvVehicles.Items(i).SubItems(1).Text, 1, iChars) = Mid(sReg, 1,
iChars) Then
dlvVehicles.Select()
dlvVehicles.Items(i).Selected = True
End If




Next
Nov 22 '05 #1
0 1767

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: AndyDunning | last post by:
Folks, I'm loading a listview on a form with Vehicle Data for a specified client. I also pass in a specific registration relating to a current client request. The record is displayed and the...
2
by: ashley | last post by:
How do i detect that the vertical scroll bar has been moved and how do i get the vertical scrollbar value from a listview. I need to do this to synchronise a textbox movement within the listview.
2
by: Gary Brown | last post by:
Hi, How do you programmatically scroll a ListView control horizontally? (The same effect as if the user used the horizontal scroll bar,) I've done it in C++/MFC, but can't find the means in C#. ...
2
by: | last post by:
Hi, Trying to figure out how i can tell if the scrollbar is in the bottom of my listview, im using the listview to display log files and i track them and add new items to the bottom of the...
5
by: Frank | last post by:
Hello, if autoscroll is true in a form. Is there a way to detect the scrollbars are active? Thanks Frank
0
by: Jeff | last post by:
I am making a custom control that displays images, allows zooming in and out, and can fit the image to the control. The way I am handling all of this is probably not best, but I was looking for a...
0
by: Bernie Yaeger | last post by:
How can I autoscroll a listview? I want the mouse cursor to autoscroll the listview up when it hits the top of the listview and down when it hits the bottom of the listview. Thanks for any...
6
by: Mike Johnson | last post by:
I have a ListView on a form, I'm displaying the items as a list. The Scroll is set to true. I want to know how can I set the scroll bar to Vertical?
0
by: eweaver | last post by:
Hello, I have a problem with getting an autoscrollbar to end up where I want it. Things to know about the prob: I have an imagebox inside of a Panel for (inheritance of) autoscroll capabilities....
1
by: =?Utf-8?B?R3VzIENodWNo?= | last post by:
I’m working on a GroupBox and need to set the AutoScroll property to true. My problem is I have no AutoScroll property listed in the property box. And even if I go in to the Designer.cs file I...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.