Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » Inserting text into the current cursor position
Re: Inserting text into the current cursor position [message #22024 is a reply to message #21984] Sun, 14 June 2009 22:43 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
jeremy_c wrote on Sat, 13 June 2009 20:11

I wound up, for the time being, using PasteText, and then using GetData() from the control the text was pasted into, then manipulating the string, then using SetData().

Is that an acceptable means?

Jeremy



Well, I spent several years refining these template techniques for my DB apps.

One (initial) approach was to keep templates as QTF. Later I have added "Editor" button.

One of aims of developing Esc was to provide scripting language for these templates. There is even "direct support" Expand function in the package.

Anyway, recent very superior approach is to (mis)use index entries. RichEdit has slightly altered interface capable of inserting some predefined parts, lake above "current date". These get inserted in actual form (actual date), but get marked as index entry, with value expressing that this text is date.

Later text can be regenerated to contain the real date.

The big advantage of this approach is that these templates can be created and edited by average users. Actually, if they use the insert button in normal editing of final document, they can even save such document as the new template.

The only part that is left to system administrator is the definition of those "inserted fields". There they get assigned Ids, names and QTF definition using Esc.

If this fits your usage, I can pack the package that provides this and post here. Maybe you can even refactor it to be included in bazaar:)

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Spelling Button on RichEdit
Next Topic: how get font height
Goto Forum:
  


Current Time: Sun Apr 28 20:00:42 CEST 2024

Total time taken to generate the page: 0.03668 seconds