[Mono-winforms-list] NumericUpDown event problem

Jackson Harper jackson at ximian.com
Thu Mar 16 17:19:57 EST 2006


Ok, i confirmed that the event doesn't seem to get triggered twice.
There does seem to be a sizing issue related to the AutoScaleBaseSize
though.

Thanks,
Jackson


On Thu, 2006-03-16 at 21:07 +0000, Paul wrote:
> Hi,
> 
> > Alex, since you obviously cleaned up the code to test this do you mind
> > posting the clean code to the list?
> 
> using System;
> using System.Windows.Forms;
> using System.Drawing;
> 
> class simpletest : Form
> {
>   private NumericUpDown number;
> 
>   public simpletest()
>   {
>     number = new NumericUpDown();
>     number.Location = new Point(12, 12);
>     number.Name = "numberbox";
>     number.Size = new Size(50, 23);
>     number.ValueChanged += new EventHandler(number_ValueChanged);
> 
>     AutoScaleBaseSize = new Size(5, 13);
>     ClientSize = new Size(80, 40);
>     Controls.Add(number);
>     Name = "simpletest";
>     Text = "NumericUpDown text";
>   }
> 
>   private void number_ValueChanged(object sender, System.EventArgs e)
>   {
>     Console.WriteLine("Event triggered happily");
>   }
> 
>   public static void Main()
>   {
>     simpletest t = new simpletest();
>     Application.Run(t);
>   }
> }
> 
> Basically the same code, except with a ; after System.Drawing (or was it
> SWF?) and Add.Controls instead of Add.Control
> 
> TTFN
> 
> Paul
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list



More information about the Mono-winforms-list mailing list