Solved

ListView Highlighting

Posted on 2002-06-25
7
274 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 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