Wrong working of Button.MouseLeave in Windows XP .NET 1.1
"Kirubakaran Prince" <[email protected]> Wed, 11 May 2005 16:34:49 +0200
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Organization | Key Technologies |
| Message-ID | <[email protected]> |
using System;
using System.Windows.Forms;
using wx;
using System.Drawing;
using Button = wx.Button;
namespace wxNET
{
class MyFrame : Frame
{
public MyFrame(string title): base(title!= null?title:"oops...")
{
}
}
class Start : App
{
public override bool OnInit()
{
MyFrame frame = new MyFrame("princed");
Button but = new Button(frame,"Press");
//but.SetSize(new Size(10,12));
but.Click+= new EventListener(ButtonPressHandler);
but.MouseLeave+= new EventListener(but_MouseLeave);
return frame.Show();
}
public static void ButtonPressHandler(object sender, Event e)
{
MessageDialog.ShowModal("message","Caption",1);
}
[STAThread]
static void Main(string[] args)
{
Start s = new Start();
s.Run();
}
private void but_MouseLeave(object sender, Event e)
{
MessageDialog.ShowModal("Mouse left","Caption",1);
}
}
}
NOTE:
When I move the mouse very fast over the button which fills the entire
frame (MyFrame), MouseLeave(but_MouseLeave) is not getting called ....and
after this fast move , MouseLeave(but_MouseLeave) is getting called on mouse
enter !!!!!!