TechTricks
Technical answers from the trenches 
 
 
 
 

     
   
Automatic Edit Mode
 
   
by Lance Leonard 
 Posted: 12 July 2000
 
   
 
 Applies to: All Versions
 
   
 
Audience: Beginner
 
       
   

Question: I have a memo field on my form and Paradox automatically selects the entire text of my memo when I move into it. Also, I need to press F2 to edit the memo. Is there any way I can automate that?

Answer: Yes! Add the following code to your memo field object's setFocus() event:

self.postAction( editEnterMemoView )
   self.postAction( moveEnd ) ; Move to end of memo.

This tells Paradox to add two events to any additional processing that it's currently performing. The first simulates pressing F2 by triggering the action that happens when you press F2 manually. The second event moves the cursor to the last character in the memo. (While this isn't strictly necessary, many users appreciate the extra help.)

Understanding actions

Actions are internal events that Paradox uses to process events that can be generated in various means, e.g. by keyboard shortcuts, menu commands, and as side-effects of other user interaction. One key to creating easy to use Paradox applications lies in understand the actions Paradox uses to process events. You can provide a great deal of convenience and customization by using ObjectPAL to control how Paradox responds to various actions. For more information, see the Actions, Events, and built-in event methods topic in the ObjectPAL Reference Help file.

 

       

Top

Feedback About Paradox Delphi Assorted Web Stuff
 
 
Copyright © 2000-2004, techtricks.com; All Rights Reserved.
Acknowledgements, Disclaimers, Terms and Conditions.
Article last updated on 14 June 2003

 

Other Sites: Paradox, Delphi, Perl, Web Stuff, and More


 

[- End -]