[Mono-osx] EventHandling and SWF

kangaroo grompf@sublimeintervention.com
Fri, 15 Apr 2005 14:58:58 -0400


It appears to be a bug in my driver.

Please file a bug and assign it to me.

-kangaroo

On 15-Apr-05, at 2:36 PM, Daniel Schmidt wrote:

> What's about the EventHandling with System Windows Form on OSX ?
>
> it's OSX 10.3.8 and I'm running Mono Version 1.1.6 .
>
> I wrote this sample Currency Converter app but there's no action if 
> the Button is clicked.
>
> using System;
> using System.Drawing;
> using System.Windows.Forms;
>
> public class Calculator : Form
> {
>    Button btnCalc;
>
>    TextBox textBoxPrinc;
>    TextBox textBoxRate;
>    TextBox textBoxInt;
>
>    Label labelPrinc;
>    Label labelRate;
>    Label labelInt;
>
>    public Calculator()
>    {
>       this.Text = "Calculator";
>       this.Size = new Size(200,225);
>
>       btnCalc = new Button();
>       btnCalc.Location = new Point(50,100);
>       btnCalc.Text = "Berechnen";
>
>       btnCalc.Click += new System.EventHandler(this.onBtnCalcClicked);
>
>       this.Controls.Add(btnCalc);
>
>       textBoxPrinc = new TextBox();
>       textBoxPrinc.Location = new Point(10,20);
>       textBoxPrinc.Size = new Size(150,15);
>       textBoxPrinc.Text = "1000000.00";
>
>       this.Controls.Add(textBoxPrinc);
>
>       textBoxRate = new TextBox();
>       textBoxRate.Location = new Point(10,60);
>       textBoxRate.Size = new Size(150,15);
>       textBoxRate.Text = "0.15";
>       this.Controls.Add(textBoxRate);
>
>       textBoxInt = new TextBox();
>       textBoxInt.Location = new Point(10,150);
>       textBoxInt.Size = new Size(150,15);
>       textBoxInt.Text = "15000.00";
>       this.Controls.Add(textBoxInt);
>
>       labelRate = new Label();
>       labelRate.Location = new Point(10,45);
>       labelRate.Size = new Size(144,15);
>       labelRate.Text = "Zinsrate";
>       this.Controls.Add(labelRate);
>
>       labelInt = new Label();
>       labelInt.Location = new Point(10,135);
>       labelInt.Size = new Size(144,15);
>       labelInt.Text = "Zinssatz";
>       this.Controls.Add(labelInt);
>
>    }
>
>    private void onBtnCalcClicked(object sender,System.EventArgs args)
>    {
>         double prin = Convert.ToDouble(textBoxPrinc.Text);
>
>         double rate = Convert.ToDouble(textBoxRate.Text);
>
>         double amt = prin * rate;
>         string ans = amt.ToString("f2");
>         textBoxInt.Text = ans;
>     }
>
>    public static void Main(string[] args)
>    {
>       Application.Run(new Calculator());
>    }
> }
>
> any suggestions ?
>
> thanks in advance,
>
> Daniel
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
>
> !DSPAM:42600bd7250424950547076!
>