Hi,
 
I have a simple form with a toolbar and a grid.
 
I set the focus to the grid.
 
When I click a button in the toolbar I never get a leave event notification 
from the grid.
 
Is this the expected behavior?
 
I do get the leave event before the button click event when clicking a simple 
button.
 
Thanks,
 
Mark Potter
 
/// <summary>

/// The main entry point for the application.

/// </summary>

[STAThread]

static void Main() 

{

Application.Run(new Form1());

}

private void dataGrid1_Leave(object sender, System.EventArgs e)

{

label1.Text += "\ndataGrid1_Leave";

}

private void toolBar1_ButtonClick(object sender, 
System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

label1.Text += "\ntoolBar1_ButtonClick";

}

private void Form1_Load(object sender, System.EventArgs e)

{

label1.Text += "\nForm1_Load";

dataGrid1.Focus();

}

private void button1_Click(object sender, System.EventArgs e)

{

label1.Text += "\nbutton1_Click";

}

private void button1_Leave(object sender, System.EventArgs e)

{

label1.Text += "\nbutton1_Leave";

}

}


===================================
This list is hosted by DevelopMentor�  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to