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 15:02:33
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
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:
01089878
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.

Even better - no string manipulation needed:

this.editbox.seltext="any text or string variable you like"

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform