Link to home
Start Free TrialLog in
Avatar of wildzero
wildzero

asked on

Select item above or below in listview

Hi there,

I have a Listview component, with 5 items in it, when I select say, the 3rd item I want a button that I can click to move the selection pointer (not the item) up or down. So basically it just moves up or down the list - not the item, just the selection.

I tried lvItems.selected.index + 1 but that didn't work.

Many thanks
Nick
ASKER CERTIFIED SOLUTION
Avatar of Barthax
Barthax
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
lvItems.Items[lvItems.ItemIndex-1].Selected := True;
lvItems.Items[lvItems.ItemIndex+1].Selected := True;
Avatar of wildzero
wildzero

ASKER

Awesome :-)
Thank you!