[Mono-bugs] [Bug 76788][Nor] New - ComboBox dropdownlist doesn't scroll to selected item

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Nov 22 13:13:30 EST 2005


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 dbjobs at snafu.de.

http://bugzilla.ximian.com/show_bug.cgi?id=76788

--- shadow/76788	2005-11-22 13:13:30.000000000 -0500
+++ shadow/76788.tmp.7652	2005-11-22 13:13:30.000000000 -0500
@@ -0,0 +1,94 @@
+Bug#: 76788
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: SUSE 10 OSS
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com                            
+ReportedBy: dbjobs at snafu.de               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ComboBox dropdownlist doesn't scroll to selected item
+
+Description of Problem:
+Dropdownlist of MWF ComboBox doesn't automatically scroll down to selected
+item.
+
+Steps to reproduce the problem:
+1. Create .exe from .cs file shown below (I used .NET 1.1 + csc).
+2. Run .exe under .NET and click ComboBox: Dropdownlist opens + scrolls to
+selected item (Aquamarine)
+3. Run .exe under Mono and click ComboBox: Dropdownlist opens but doesn't
+scroll (but item is selected correctly)
+
+Actual Results:
+Dropdownlist doesn't scroll at all.
+
+Expected Results:
+Dropdownlist should scroll to selected item
+
+How often does this happen? 
+Always
+
+Additional Information:
+I'll attach screenshots + compiled program.
+
+---------------- .cs file -----------------------
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+
+	public class Form1 : System.Windows.Forms.Form
+	{
+		private System.Windows.Forms.ComboBox cboColors;
+		private System.Windows.Forms.Label lblInstructons;
+
+		public Form1()
+		{
+			// cboColors
+			this.cboColors = new System.Windows.Forms.ComboBox();
+			this.cboColors.DropDownStyle =
+System.Windows.Forms.ComboBoxStyle.DropDownList;
+			this.cboColors.Location = new System.Drawing.Point(104, 56);
+			this.cboColors.Name = "cboColors";
+			this.cboColors.Size = new System.Drawing.Size(176, 21);
+			this.cboColors.TabIndex = 4;
+			// Fill combo with known color's names
+			string[] ColorNames = Enum.GetNames(typeof(KnownColor));
+			cboColors.Items.AddRange(ColorNames);
+			cboColors.SelectedIndex = 30;
+
+			// lblInstructons
+			this.lblInstructons = new System.Windows.Forms.Label();
+			this.lblInstructons.Location = new System.Drawing.Point(8, 16);
+			this.lblInstructons.Name = "lblInstructons";
+			this.lblInstructons.AutoSize = true;
+			this.lblInstructons.Size = new System.Drawing.Size(96, 23);
+			this.lblInstructons.TabIndex = 1;
+			this.lblInstructons.Text = 
+				".NET automatically scrolls to selected item in DropDownList - Mono
+doesn't.";
+
+			// Form1
+			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+			this.ClientSize = new System.Drawing.Size(402, 153);
+			this.Controls.Add(this.cboColors);
+			this.Controls.Add(this.lblInstructons);
+			this.Name = "Form1";
+			this.Text = "Demo for ComboBox Bug";
+		}
+
+
+		[STAThread]
+		static void Main() 
+		{
+			Application.Run(new Form1());
+		}
+	} // class Form1
+---------------- the end -----------------------


More information about the mono-bugs mailing list