Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to refer to toolbar?

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!
I have a custom toolbar as per '1001 things'.
Would it be possible to retrieve a reference to a button on the toolbar so I can run code from a toolbarbutton from a menuitem?
-Bart
 
Sure, how that toolbar is created?

Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
Hi!
Toolbar is created as class but is instanciated from the form-manager. To trace that code is a bit weird to me. (sorry authors of 1001 things...)
-Bart
 
If you don't know the name you use for the Toolbar object, how I supposed to know it :)
Click on toolbar and see the name in the properties window.


Borislav Borissov
VFP9 SP2, SQL Server 2000/2005.
Microsoft MVP VFP
 
I'd suggest you do store the code to execute somewhere, where you can call it from both the toolbar button and a menu item, eg a function/procedure in a prg.

That way you would not need a reference to a toolbar button in a menu item and everything is less complicated.

Bye, Olaf.
 
Thanks all for your time!
I feel Olaf's solution is most easiest to implement.
Thanks!

-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top