D
Doug Bratton
HELP! OK. I have a Windows form with a tab control. On one of the tab
control tab pages, I have an panel.
On this panel I am dynamically creating a variable number of customized
Buttons based on stored records from a database.
For each button, I am over-riding the MouseUp like so to open a Dialog
Window... after I close the dialog, it throws an exception... Any ideas???:
private void roomButton_MouseUp(object sender,
System.Windows.Forms.MouseEventArgs e)
{
foreach(RoomButton button in panel1.Controls)
{
if (button.Focused)
{
if (e.Button == MouseButtons.Left)
{
AddRoom addRoom = new AddRoom(this, button.ARoom);
addRoom.ShowDialog(this);
}
}
}
}
control tab pages, I have an panel.
On this panel I am dynamically creating a variable number of customized
Buttons based on stored records from a database.
For each button, I am over-riding the MouseUp like so to open a Dialog
Window... after I close the dialog, it throws an exception... Any ideas???:
private void roomButton_MouseUp(object sender,
System.Windows.Forms.MouseEventArgs e)
{
foreach(RoomButton button in panel1.Controls)
{
if (button.Focused)
{
if (e.Button == MouseButtons.Left)
{
AddRoom addRoom = new AddRoom(this, button.ARoom);
addRoom.ShowDialog(this);
}
}
}
}