question about listview

  • Thread starter Thread starter Thomas
  • Start date Start date
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
 
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

 
Back
Top