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

How to focus a selected record in a TListView

Posted on 2004-09-16
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?
Question by:mikelittlewood
  • 3
LVL 11

Accepted Solution

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

Expert Comment

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

LVL 13

Expert Comment

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

by this:

try with both and see the difference

best regards
LVL 15

Author Comment

ID: 12083100
ah ha !

thanks guys
LVL 13

Expert Comment

ID: 12088620

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

Title # Comments Views Activity
error 1.1 400 Bad request idhttp delphi 18 148
Intraweb download file link ? 1 156
Convert a string into a TDateTime 5 64
can't find the executable in Simulator 1 100
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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