Hi there,

first of all, I'm new to Mono. So far the only thing I've done by using Mono 
was a little FooTesting SWF Application (attached to this email) , containing 
only a Label and a Textbox.

However, something odd happend in that App. I tried to show a MessageBox once 
my TextBox has been clicked. But the MessageBox did not appear.

I dug in little deeper and found out, that the Click Event has been redeclared 
in TextBoxBase, but is never fired.

Just out of curiosity I tried to fix the bug myself by commenting out the 
Click Event declaration in TextBoxBase.

But now I can't test my changes because MonoDevelop can't build SWF. (I got 
the whole mcs trunk from SVN and imported the VS2005 Project Files to 
MonoDevelop.) Is there something I'm missing?

Kind Regards,
Valentin S.
using System;
using System.Drawing;
using System.Windows.Forms;

namespace TxtBxTest {

	public class TextBoxTest : Form {
		
		public TextBoxTest () {
			Label lbl = new Label ();
			lbl.Text = "Click Me!";
			lbl.Location = new Point (0, 0);
			lbl.Click += new EventHandler (this.lbl_Clicked);
			this.Controls.Add (lbl);
			
			TextBox tb = new TextBox ();
			tb.Location = new Point (0, 25);
			tb.Click += new EventHandler (this.textBox_Clicked);
			this.Controls.Add (tb);
		}
		
		private void lbl_Clicked (object sender, EventArgs e) {
			MessageBox.Show ("Label was clicked");
		}
		
		private void textBox_Clicked (object sender, EventArgs e) {
			MessageBox.Show ("TextBox was clicked");
		}
		
		public static void Main ()
		{
			Application.Run (new TextBoxTest ());
		}
	}
}
_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Reply via email to