bug with listview in C# - 2 clicks required to select item

B

Bruce Bakely

I have a simple listview using view=Details. When the user clicks on an item
I pop up a message. After the user hits OK on the popup message, the
original form is now dead to user input until a click is made anywhere on
the form. In other words, in order to select another item in the list, you
have to tap somewhere on the form, and then tap on the item.
Any ideas? Has anyone else seen this behavior, or NOT seen this behavior on
different hardware?
I have a symbol PDT8100 using pocket pc 2002, C#.
It works fine on the emulator.

my code:
private void Form1_Load(object sender, System.EventArgs e)

{

listView1.Columns.Add("Item", 50, HorizontalAlignment.Center);

listView1.Items.Add(new ListViewItem("item1"));

listView1.Items.Add(new ListViewItem("item2"));

}

private void listView1_SelectedIndexChanged(object sender, System.EventArgs
e)

{

if (listView1.SelectedIndices.Count == 1)

MessageBox.Show("listview");

//listView1.Focus(); // doesn't help

}
 
S

Shaun Wilde

I've seen this as well

have you tried giving your form the focus after the popup dialog box has
gone rather than the list view

shaun
 
K

Keld Laursen

Shaun Wilde said:
I've seen this as well

have you tried giving your form the focus after the popup dialog box has
gone rather than the list view

Or maybe both the ListView and the form?

/Keld Laursen
 
B

Bruce Bakely

Yep. I've tried combinations of giving the ListView, ListViewItems, and/or
form the focus, as well as manually turning off the ListViewItem selected
property. My guess is that ListView is just broken in the compact framework,
no workaround.
 
B

Bruce Bakely

Yep. I've tried playing with .Focus and .Selected, in various combinations.
As far as I can tell this is a bug in the compact framework with no
workaround.
 

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