question about listview

T

Thomas

Hi!

I am having a question about the listview control in .NET CF.

In my application, I have a listview control (in detail view) to show a
contact list with names and phone numbers. The users are allowed to enter
first few characters of the contract name via a textbox so that the
application will highlight the first contact item which meets the entered
characters. I tried to use the code "lvitem.Selected = true;" to select
a listview item and this piece of code does successfully select and
highlight the listview item for me. However, if the listview contains more
than 10 listview items, the users may have to locate the selected listview
item by using the vertical scroll bar (because the listview area can only
show 10 listview items in a time).

How can I make the listview to scroll to the selected listview item
automatically?

Regards,
Thomas
 
T

Thomas

Thanks a lot!

Regards,
Thomas

Daniel Moth said:
Look at the ensurevisible method...

Cheers
Daniel

Thomas said:
Hi!

I am having a question about the listview control in .NET CF.

In my application, I have a listview control (in detail view) to show a
contact list with names and phone numbers. The users are allowed to enter
first few characters of the contract name via a textbox so that the
application will highlight the first contact item which meets the entered
characters. I tried to use the code "lvitem.Selected = true;" to select
a listview item and this piece of code does successfully select and
highlight the listview item for me. However, if the listview contains more
than 10 listview items, the users may have to locate the selected listview
item by using the vertical scroll bar (because the listview area can only
show 10 listview items in a time).

How can I make the listview to scroll to the selected listview item
automatically?

Regards,
Thomas

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top