Mike Littlewood
asked on
How to focus a selected record in a TListView
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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you only want it focused, but not selected, change
ListView1.Items[10].Select ed:=True;
by this:
ListView1.Items[10].Focuse d:=True;
try with both and see the difference
best regards
EberSys
ListView1.Items[10].Select
by this:
ListView1.Items[10].Focuse
try with both and see the difference
best regards
EberSys
ASKER
ah ha !
thanks guys
thanks guys
???
ListView1.Items[10].MakeVi
ListView1.Items[10].Select
ListView1.SetFocus