Solved

ListView Highlighting

Posted on 2002-06-25
7
269 Views
Last Modified: 2010-05-02
What i am wanting to do is let the user click on one of the items in the listview and have the entire line highlight. currently i have the listview set up on report view. Thanks for any help.
0
Comment
Question by:sk33v3
7 Comments
 
LVL 6

Expert Comment

by:xSinbad
ID: 7109369
Like this;

ListView1.ListItems(5).EnsureVisible
ListView1.ListItems(5).Selected = True
ListView1.SetFocus
0
 
LVL 9

Author Comment

by:sk33v3
ID: 7109379
what is the 5 used for? What i am trying to figure out from that code is does 5 have to be 5 or can it be 46 or some other number.
0
 
LVL 9

Author Comment

by:sk33v3
ID: 7109402
what is the 5 used for? What i am trying to figure out from that code is does 5 have to be 5 or can it be 46 or some other number.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 6

Expert Comment

by:xSinbad
ID: 7109478
Yes what ever the list item index number is.
0
 
LVL 1

Accepted Solution

by:
ophirg earned 50 total points
ID: 7109717
Hi.

Set the FullRowSelect property to true.

ListView.FullRowSelect = True

Ophir.
0
 
LVL 6

Expert Comment

by:marconovaro
ID: 7109878

If you are using the Microsoft Windows Common Controls version 6.0, you can set the FullRowSelect property either at design or at run time. At design time, you can use the property window that you can find right clicking the listview.

If you have an older version of the Common Controls, you can have a look to the following MSKB article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q181440

where you can find how to do it programmatically.
Hope this helps you.
Marco.
0
 
LVL 9

Author Comment

by:sk33v3
ID: 7111459
Sinbad yours didn't work. but ophirg you answered my problem first. Thanks ophirg and macronovaro.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question