Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843

    Insert text (or string) in RTF object

    Is the above possible?
    I tried working via the clipboard but could not find a way to copy a string into the clipboard.
    I tried working with GetSelection but it only gives the position (start and end) of the selection, not the text itself.
    What I need is actually to insert text before and after a line in a html file.

    My scenario was to read the html file into a RTF object, thus allowing the user to highlight the relevant line. Then I wanted to put some text before and after that line. Something like:

    Starting with:
    yadayadayada

    and ending with:
    intro text yadayadayada outro text

    Any idea?

    Thanks

    Yossi

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Maybe something like this?
    Code:
    tPoint = RichText.GetSelection("RichText1")
    sLeft = String.Left(RichText.GetText("RichText1", false), tPoint.Start -1)
    sSelected = String.Mid(RichText.GetText("RichText1", false), tPoint.Start, tPoint.End - tPoint.Start + 1)
    sRight = String.Mid(RichText.GetText("RichText1", false), tPoint.End + 1, -1)
    
    Dialog.Message("", sLeft.." Intro "..sSelected.." Outro "..sRight)

  3. #3
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    YES! Exactly.
    Thank you Worm. Should have solved that myself but I was stuck in brain-mud.


    Yossi

Similar Threads

  1. i need to insert a text filw line after liane into a tree object
    By lnd in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 10-15-2005, 08:45 AM
  2. AMS Design environment questions
    By Lavrendi in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 10-27-2003, 08:21 AM
  3. INFO: Difference between the Media Player Object and the AVI Object
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-29-2002, 02:15 PM
  4. TUTORIAL: Showing and Hiding Objects in AutoPlay Menu Studio 3.0
    By Support in forum AutoPlay Menu Studio 3.0
    Replies: 0
    Last Post: 10-10-2002, 02:39 PM
  5. Text object on top of Text Box object with AM3?
    By MeTAlMollY in forum AutoPlay Menu Studio 3.0
    Replies: 1
    Last Post: 07-15-2002, 12:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts