Is it possible to get the toolbar button's name at the ButtonClick event?

S

SammyBar

Hi all,

Is it any way to refer to toolbar's buttons other than by its index in the
collection?
The reccomended method on the documentation is the following:

switch (tbToolbar.Buttons.IndexOf(e.Button))
{
case 0:
...
break;
case 1:
...
break;
case 2:
...
break;
}

But during development it is very frequent the buttons disappears or the
order of displaying changes, then I should recode the button click handling
to get in sync with the new button order. Is it possible to get the name of
the button to make the switch decision based on it?

Thanks in advance
Sammy
 
S

SammyBar

That is right! It is a lot more clear than the SDK sample code. Thanks a lot

Sammy
 

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

Top