Results 1 to 2 of 2

Thread: RTF Edit Controls

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Taipei
    Posts
    318

    Red face

    I use the MS RTF Control, it displays a blank area for people to key in. But I saw before from somebody, that there can be a tool bar, just like in MS Word, to change the color, font or so. Is it true, is it really there>

    Or do I write it myself, if so, how?

    Thanks for any input.

  2. #2
    Guest
    Yes you can do that. Make a From and add a CommonDialog, CommandButton and RichTextBox and insert the following code into it.
    Code:
    Private Sub Command1_Click()
        'Set the CommonDialog to match the RTFBox
        CommonDialog1.Flags = cdlCFEffects Or cdlCFBoth
        CommonDialog1.FontName = RichTextBox1.SelFontName
        CommonDialog1.FontSize = RichTextBox1.SelFontSize
        CommonDialog1.Color = RichTextBox1.SelColor
        CommonDialog1.FontBold = RichTextBox1.SelBold
        CommonDialog1.FontItalic = RichTextBox1.SelItalic
        CommonDialog1.FontUnderline = RichTextBox1.SelUnderline
        'Show the FontDialog box
        CommonDialog1.ShowFont
        'Make changes to the RTFBox
        RichTextBox1.SelFontName = CommonDialog1.FontName
        RichTextBox1.SelFontSize = CommonDialog1.FontSize
        RichTextBox1.SelColor = CommonDialog1.Color
        RichTextBox1.SelBold = CommonDialog1.FontBold
        RichTextBox1.SelItalic = CommonDialog1.FontItalic
        RichTextBox1.SelUnderline = CommonDialog1.FontUnderline
    End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width