[Mono-bugs] [Bug 82634][Wis] New - Different behaviour for FolderBrowserDialog class respect MS implementation

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 30 11:18:45 EDT 2007


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 tquerci at gmail.com.

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

--- shadow/82634	2007-08-30 11:18:45.000000000 -0400
+++ shadow/82634.tmp.17082	2007-08-30 11:18:45.000000000 -0400
@@ -0,0 +1,162 @@
+Bug#: 82634
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: tquerci at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Different behaviour for FolderBrowserDialog class respect MS implementation
+
+The FolderBrowserDialog class have a different behaviour is compared to MS
+implementation. In MS if you not specify the RootFolder attribute you
+obtain an ampty dialog, while under mono implementation you obtain as you
+specify the System.Environment.SpecialFolder.Desktop constant.
+If you do it in Mono implementation you obtain two Desktop tree.
+
+I try to run the same assembly using mono on Linux and Windows platform,
+and  MS VM on Windows Platform.
+
+
+Here I put a testing code
+---------------------------------------------------------
+using System;
+
+using System.Drawing;
+
+using System.Windows.Forms;
+
+
+
+namespace sw_verifiche
+
+{
+
+	
+
+	public class FormMain : System.Windows.Forms.Form
+
+	{
+
+
+
+
+
+        private System.Windows.Forms.Panel panel1;
+
+ 
+		private System.Windows.Forms.TextBox directorySalvataggio;
+
+		
+
+		public FormMain()
+
+		{			
+
+			this.panel1 = new System.Windows.Forms.Panel();
+
+			this.panel1.SuspendLayout();
+
+
+			this.SuspendLayout();
+
+
+			directorySalvataggio=new TextBox();
+
+			directorySalvataggio.Text="-- Click Here please --";
+
+			directorySalvataggio.Location=new System.Drawing.Point(30,30);
+
+			directorySalvataggio.Size=new System.Drawing.Size(500,20);
+
+			directorySalvataggio.ReadOnly=true;
+
+			directorySalvataggio.TabStop=false;
+
+			directorySalvataggio.Click += new EventHandler(changeDirectoryStoreEvent);
+
+			
+
+			this.panel1.Controls.Add(directorySalvataggio);
+
+			
+
+			this.panel1.Name = "panel1";
+
+			this.panel1.Size = new System.Drawing.Size(600,100);
+
+
+			this.Size=new System.Drawing.Size(600,100);
+
+			this.Controls.Add(this.panel1);
+
+			this.Name = "Form1";
+
+			this.Text = "Form1";
+
+
+
+			this.ResumeLayout(false);
+
+		}	
+
+		
+
+		public void quitHandler(object o, EventArgs a) {
+
+			DialogResult res = MessageBox.Show("Do you see this
+dialog?","Attention!!!",MessageBoxButtons.YesNo);
+
+			if (res==System.Windows.Forms.DialogResult.Yes) {
+
+				this.Hide();
+
+				Application.Exit();
+
+			}
+
+		}
+
+		
+
+		public static void Main(string[] args) {
+
+			Application.Run(new FormMain());
+
+		}
+
+
+
+		private void changeDirectoryStoreEvent(object sender, EventArgs e)
+
+		{
+
+
+
+			System.Windows.Forms.FolderBrowserDialog fbd=new
+System.Windows.Forms.FolderBrowserDialog();
+
+			fbd.Description="Under Linux the dialog is fill, under MS VM is empty.";
+
+			if (fbd.ShowDialog()==System.Windows.Forms.DialogResult.OK) {
+
+				directorySalvataggio.Text=fbd.SelectedPath;
+
+			}
+
+
+
+		}
+
+
+	}
+
+}


More information about the mono-bugs mailing list