[Mono-bugs] [Bug 80202][Nor] New - ListView.OnItemActivate does not work
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Dec 9 10:29:28 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by georgegiolfan at yahoo.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80202
--- shadow/80202 2006-12-09 10:29:28.000000000 -0500
+++ shadow/80202.tmp.10902 2006-12-09 10:29:28.000000000 -0500
@@ -0,0 +1,71 @@
+Bug#: 80202
+Product: Mono: Class Libraries
+Version: 1.2
+OS: Windows XP
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com
+ReportedBy: georgegiolfan at yahoo.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ListView.OnItemActivate does not work
+
+Description of Problem:
+OnItemActivate does not appear to be called in a derived class.
+
+Steps to reproduce the problem:
+1. Compile and run the following program.
+using System;
+using System.Windows.Forms;
+class TestForm : Form {
+ static void Main() {
+ Application.Run(new TestForm());
+ }
+ public TestForm() {
+ MyListView listView = new MyListView();
+ listView.Items.Add("Test");
+ Controls.Add(listView);
+ }
+}
+class MyListView : ListView {
+ protected override void OnItemActivate(EventArgs e) {
+ MessageBox.Show(string.Empty);
+ }
+}
+2. Double click on the item.
+
+Actual Results:
+Nothing happens.
+
+Expected Results:
+A message box appears.
+
+How often does this happen?
+Always.
+
+Additional Information:
+Strangely, handling ItemActivate seems to work, like in the following
+example.
+using System;
+using System.Windows.Forms;
+class TestForm : Form {
+ static void Main() {
+ Application.Run(new TestForm());
+ }
+ public TestForm() {
+ ListView listView = new ListView();
+ listView.Items.Add("Test");
+ Controls.Add(listView);
+ listView.ItemActivate += new EventHandler(listView_ItemActivate);
+ }
+
+ void listView_ItemActivate(object sender, EventArgs e) {
+ MessageBox.Show(string.Empty);
+ }
+}
More information about the mono-bugs
mailing list