Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting text into a edit field using a button
Message
From
24/01/2006 09:33:39
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01089711
Message ID:
01089714
Views:
20
>I have created a form in which a user can type in a message. When the user clicks a button I want to insert some text where the cursor is located in the message. For example at any time the user can click a button and it inserts the text OPTION1 in the edit field of the message.
>
>Any ideas

You can find out the position of the cursor with .SelStart (see also .SelLength). From there, it should be possible to manipulate the EditBox.Text property, through standard string-manipulation functions.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform