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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add toolbar elements from standard toolbar

Status
Not open for further replies.

gteran

Programmer
Jul 1, 2003
8
MX
I am kind of new about this, so forgive me if this is a stupid question.

I made a toolbar with the class designer, but I'd like to add some buttons from standard tool bar such as print, undo, preview, etc.

Could anyone tell me where is the trick?

Thank you very much.
 
gteran,

No, it is not a stupid question. It is a very common thing to want to do, and not obvious how to do it.

Basically, you should go ahead and add buttons to your toolbar in the usual way. Set the Picture property to the icon or graphic that you want to use. All the standard VFP toolbar graphics are available with VFP, in either the Graphics or the Gallery folders.

In the Click event, write your code. If you want to exactly mimic a built-in function, like Cut, Copy, Paste, Undo, etc, check out the SYS(1500) function. For other buttons, you will have to write your own code -- for example, to open a given table or to print a given report.

Hope this will get you started. Come back if you need more help.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top