0

I am designing an editor program using rich text box in vb 6.0. I want to add a special box for entering verse or poems so that when I click a button, this box is placed at current position of cursor e-g if cursor is at line#3, the box is placed at line#3 and focus is changed from rtb to box. And after entering text in this box, when i click rtb, focus is changed from box to rtb, also cursor is placed below this box. Also I want that when I save the document, this box is also saved with. I have tried adding text box to accomplish these tasks but i am having problem setting position of textbox, setting focus and position of cursor. Also I dont think it can be saved with document. Is there a way to accomplish this by adding some box to rtb?

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by QVeen72
0

Hi,

Man i dont wana to dash your hopes, but what you r trying to do is quite difficult using such controls. I advise you to look for an alternative idea.

0

In Microsft word there is a way to add TextBox. I want to do the same in rtb. Is there a way to do this?

0

Hi,

Try This Code :

Dim MyStr As String
    Dim TotRTF As String
    Dim MyText As String
    '
    MyText = "MYTEXTBOX"
    MyStr = "\par \trowd\trgaph108\trleft36\cellx1636\pard\intbl "
    MyStr = MyStr & MyText & "\cell\row\pard\par"
    With RTB
        .SelText = Chr(&H80)
        TotRTF = .TextRTF
        TotRTF = Replace(.TextRTF, "\'80", MyStr)
        .TextRTF = TotRTF
    End With

Regards
Veena

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.