Button in Toolbar

A

Asim Tozlu

Hi NG,

i want use this example:

this.toolBar.Buttons["savedoc"].Visible = true;
But this example not work.

I can use only this one:
this.toolBar.Buttons[7].Visible = true;

I want use the keyword from Button. Have anyone a ideas.

Thanks und greeting from Berlin

Asim
 
A

Atul

The ToolBar.ToolBarButtonCollection.Item Property is not overloaded and
only supports retrieving a button by its index.

-Atul, Sky Software http://www.ssware.com
Shell MegaPack ActiveX & .Net
Drop In Windows Explorer like Shell Browsing GUI controls for your app.
 
A

Asim Tozlu

Hi,
The ToolBar.ToolBarButtonCollection.Item Property is not overloaded and
only supports retrieving a button by its index.

hmmmmmmmmm... not good, but thanks for help...
 
J

Johann Blake

Asim,

Why not just refer to the name of the button that you assigned it? You
don't need to reference the toolbar in order to reference the button on
the toolbar. Just type "this." in your code and the name of the button
will appear.

Best Regards
Johann Blake
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

You could resolve this, just create your own ToolBar class , and just
create a new indexer, you can iterate in the list and search by name

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
 

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