steve_rm
Nov 28th, 2003, 05:04 AM
Thanks for you help
I have used the code below based on what you told me. It works fine.
switch (e.Button.Tag.ToString())
Hello
I have a toolbar with some icons on it. I want to click on of the icons and open that from. But my swich statement does not work, as it asks for a integer.
code below
private void tbrIcons_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
{
switch (e.Button)//problem here, what am l doing wrong
{
case "house":
//Show house form
break;
case "village":
//show village form
break;
default:
break;
}
}
many thanks in advance
Steve
I have used the code below based on what you told me. It works fine.
switch (e.Button.Tag.ToString())
Hello
I have a toolbar with some icons on it. I want to click on of the icons and open that from. But my swich statement does not work, as it asks for a integer.
code below
private void tbrIcons_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
{
switch (e.Button)//problem here, what am l doing wrong
{
case "house":
//Show house form
break;
case "village":
//show village form
break;
default:
break;
}
}
many thanks in advance
Steve