How to programmatically select a ListBox item in the compact framework using C#

  • Thread starter Thread starter Roberto Rocco
  • Start date Start date
R

Roberto Rocco

Hello,

how can I programmatically select a ListBox item in the compact framework using C#?
The SetSelected method is not supported in the compact framework. What else can I use?

Many thanks in advance,

Roberto Rocco.
 
Hi Roberto
You can use the SelectedIndex or the SelectedItem, examples
myListBox.SelectedIndex = 2; // remember the index in C# starts on 0, o
myLisBox.SelectedItem = "myitem"

Greetings
Agus
 
Back
Top