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

How to put cut-copy-past code in toolbar.

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!
Creating a menu with basic-functions cut copy and past is easy.
But how to get that functionality in toolbar buttons?
-Bart
 

Bart,

In your "copy" button, put this code (in the Click):

SYS(1500, "_MED_COPY", "_MEDIT")

Similarly for cut and paste.

The only trouble is that the button does not get automatically greyed out when there is no text to copy or to paste. I wish I could give you an easy solution to that. Maybe someone else can.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Seems to me I wrote about using a timer to keep the toolbar buttons properly enabled/disabled a long time ago. Try 11/97 FoxPro Advisor.

Tamar
 
Tamar,
I'm not having access to Foxpro Advisor.
-Bart
 
Mike,
Your code seems not to work.
I put the code as you gave in my click-method of the toolbar-button.
Any other setting to do?
-Bart
 
The menu item in question has to be defined for SYS(1500) to work.

As for FoxPro Advisor, you should be able to order individual back issues or a year's worth of issues on CD.

Tamar
 

Bart,

Tamar has given you the answer. I was assuming you had an Edit menu which already contained cut, copy and paste commands. If not, you'll need to create one in order for the toolbar buttons to work (but it doesn't have to be visible).

In any case, I'd recommend you include a standard Edit menu in your app (assuming you have menus). User who are familiar with other apps would expect it.

As for getting back issues of FPA, the article that Tamar mentioned will only help you solve the problem of enabling or disabling the toolbar buttons. It would be nice to do that, but I don't think it's essential.

(Not that I want to discourage anyone from getting FoxPro Advisor, either on CD or paper. It's definitely worth subscribing to, [but then I've got a slight vested interest in saying that].)

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top