Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox SelLength Assign problem
Message
From
01/05/2002 04:07:06
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00650820
Message ID:
00651222
Views:
24
Hi Mario

Do you have a code snippet showing how to do this. I am a bit confused because you say use Bar# in a menu but later say your app uses no menu at all.


>Neil,
>
>If you use Bar# with _med_copy, _med_cut and _med_paste in you menu, VFP will handle all these features for you. I have a VFP7 application with no menu and these feature work without any code in the textbox.
>
>HTH
>
>Mario
>>Hi All,
>>
>> anyone have a solution to this problem? We're trying to put Basic Copy/Paste functionality into a bespoke command group to mimic the Ctrl C / Ctrl X / Ctrl V functions of the FoxPro memu. If a user selects a piece of text in a textbox, either with the mouse or Shift Arrow or Ctrl A, we need to be able to avtivate or deactivate the Copy button based on whether a piece of text is selected or not in the current textbox.
>>
>> The trouble is, we can't seem to find an event to do this in. We first tried putting in an assign method on the SelLength property, but this isn't fired is it's the user who changes the length of the selected text. I thought of trapping Key presses and mouse events (MouseUp?), and even using a timer à la Ken Levy, but it seems a bit heavy going, especially since this is going to go into a base textbox class for the project.
>>
>> We can't use the When event, since we want this to work as soon as the user selects some text, just as the FoxPro toolbar works is interactive mode. Anyone have any ideas?
>>
>>Best wishes,
>>Neil
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform