[Mono-winforms-list] NumericUpDown event problem

Paul paul at all-the-johnsons.co.uk
Thu Mar 16 16:07:34 EST 2006


> 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);
    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();

Basically the same code, except with a ; after System.Drawing (or was it
SWF?) and Add.Controls instead of Add.Control


"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/438f0db0/attachment.bin

More information about the Mono-winforms-list mailing list