[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to focus a selected record in a TListView

Posted on 2004-09-16
5
Medium Priority
?
283 Views
Last Modified: 2010-04-05
I'm not sure if Im missing something obvious here, but is there a way to focus a selected item in a listview, and actually move the scrollbars down to put it in the screen?

I've got ListView.Selected, and if I move my scroll bars down manually, I can see the record is selected.

Problem is I can't seem to get the listview to actually move down to the selected record and automatically display it by moving its own scrollbars.

What am I missing?
0
Comment
Question by:mikelittlewood
[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
  • 3
5 Comments
 
LVL 11

Accepted Solution

by:
ZhaawZ earned 200 total points
ID: 12077397
use TListView().Selected.MakeVisible(false);
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12079914
supposing you wanted to make item 10 focused:

  ListView1.Items[10].MakeVisible(True);
  ListView1.Items[10].Selected:=True;
  ListView1.SetFocus
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12079920
if you only want it focused, but not selected, change

ListView1.Items[10].Selected:=True;
by this:
ListView1.Items[10].Focused:=True;

try with both and see the difference

best regards
EberSys
0
 
LVL 15

Author Comment

by:mikelittlewood
ID: 12083100
ah ha !

thanks guys
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12088620
???
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

656 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