[Mono-winforms-list] NumericUpDown event problem
Paul
paul at all-the-johnsons.co.uk
Thu Mar 16 12:02:02 EST 2006
Hi,
I have a very simple Winform - it consists on a single NumericUpDown
button with the ValueChanged event set onto the buttons.
I'm currently seeing though that the event is being triggered twice. Can
someone confirm this behaviour so I can enter it into bugzilla?
using System;
using System.Drawing;
using System.Windows.Forms
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);
Control.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);
}
}
You should find that when compiled, the event is called twice instead of
once. I've only tested this under Mono (compiled from source at 16:00hrs
GMT), so don't know what will happen under .NET
TTFN
Paul
--
"ein zu starker starker Anblick kann Sie toten. Sie gegen gerade uber
den Rand mit dem festen Wissen des Wege vor Ihnen" - Linus Tordvals
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20060316/9693d3fb/attachment.bin
More information about the Mono-winforms-list
mailing list