From: Jamie Osborn
General VFP Topics
Tuesday, October 08, 2002 1:53:58 AM
This message was rated by:
> Hi to all, in all my APPS, i have a toolbar with cut, copy and paste buttons. What i'm trying to do is to make these buttons enable or disable when apropiate. I'm using a timer in my toolbar to check the content of _CLIPTEXT, if it's not empty i enable the paste button, and with the Cut and Copy buttons, i check the activeform, for the active control, if is a textbox or editbox, i check the property SELLENGTH, if it's >0 then i enable these buttons.
> But what i wan't to know is:
> Is there any windows function or variable that can handles if the object that has the focus is an editing region? for example with my code if i'm editing a text file, i can't use the cut and copy buttons.
> Also for stop using the SELLENGTH i wan't to know if there's any windows function that tells you if there's text selected?
> Thanks for your help
> Luis Navas
> For long you live and high you fly
I'm not sure why you need to use a timer to check _CLIPTEXT. Why not just do that test and refresh the toolbar when the relevant forms in your app get focus and then whenever you cut/copy in your app.
Help with this
Posted by Luis Navas @ 10/7/2002 3:49:18 PM
Posted by Jamie Osborn @ 10/8/2002 1:53:58 AM