HOW TO GO TO SECOND PAGE OF RTF OLEBOX

I am experimenting a form with OLE box containing RTF Text. The content of this is from a memo field. I copied this screen from the Samples\Solutions\Ole TEXT.SCX

My question is : When I open the screen, HOW DO I GO DIRECTLY LET'S SAY TO THE MIDDLE OF THE MEMO FIELD WHICH IS THE SECOND PAGE OF THE BOX. INITIALLY IT GOES TO THE FIRST CHARACTER OF THE MEMO FIELD THAT IS DISPLAYED.

Kindly help and thank you for your previous help extended.

Thank you and God bless you.

Rolly



Answer this question

HOW TO GO TO SECOND PAGE OF RTF OLEBOX

  • lgarcia

    Use (_samples+'data\employee')
    lcTemp =
    Forcepath(Sys(2015)+'.tmp',Sys(2023))
    Scan
    Strtofile
    (notes+Chr(13)+Chr(10),m.lcTemp,.T.)
    Endscan
    Use
    cData = Filetostr(m.lcTemp)
    Erase (m.lcTemp)

    Public
    oShowRTF
    oShowRTF =
    Createobject("frmShowRTF",m.cData,"mariner high school")
    oShowRTF.
    Show()

    Define Class frmShowRTF As Form
    Height
    = 250
    Width = 300
    Add Object myRTF As OleControl With ;
    height=250,Width=300,OleClass='RICHTEXT.RichTextCtrl'
    Procedure Init
    Lparameters
    tcText,tcSearch
    This.Newobject("oleRTF","myRTF","myRTFLib.vcx")
    With Thisform.myRTF
    .TextRTF = m.tcText
    .
    Left = 5
    .
    Top = 5
    .
    Height = This.Height - 10
    .
    Width = This.Width - 10
    .
    Visible = .T.
    .
    SelStart = Len(m.tcText)
    .Find(m.tcSearch)
    * .SelLength = 0
    Endwith
    Endproc
    Enddefine


  • dc.khael

    Thank you for your reply.

    The next thing I want to do is to make that selected text to be on top of the Olebox, making it the first line to be displayed without using my keyboard.

    Thanks for your time.

    Rolly


  • Eli Gazit

    You're the best.

    Thank you for this much needed help.

    May the Lord continue to use you to help others.

    Best Regards,

    Rolly Militar


  • Zwheeler

    You can use SelStart or Find("some text to find") followed by SelLength = 0.
  • HOW TO GO TO SECOND PAGE OF RTF OLEBOX