Toolbar button

D

DalePres

In your ToolBar's ButtonClick event add code like this:

private void buttonClick(object sender,
System.Windows.Forms.ToolBarButtonClickEventArgs e)
{
switch(toolBar.Buttons.IndexOf(e.Button))
{
case 0:
SomeCodeToRunForButton0();
break;
case 1 :
SomeCodeToRunForButton1();
break;
case 4 :
SomeCodeToRunForButton4();
break;
}
}

Dale
 
D

DalePres

What Web toolbar? I'm not aware of one that comes as a part of the .Net
Framework. Can you give more information on what you're using?

Dale
 
M

Mark Goldin

Microsoft.Web.UI.WebControls.Toolbar

DalePres said:
What Web toolbar? I'm not aware of one that comes as a part of the .Net
Framework. Can you give more information on what you're using?

Dale
 
D

DalePres

Is there some reference you had to set or add to your project to see that?
I don't have it in my toolbox, in my intellisense, and I don't find it in
the framework documentation.

What version of framework are you using?

Dale
 
D

DalePres

Ok.. I got it.....Microsoft namespace, rather than System.

So now today has become a good day. I learned something new.

Dale
 
M

Mark Goldin

I am having that error:
The type or namespace name 'ToolbarButton' could not be found (are you
missing a using directive or an assembly reference?)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top