Results 1 to 2 of 2

Thread: [RESOLVED] [2005] 1 format toolbar and 2 richtextboxes...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Location
    Alaska
    Posts
    435

    Resolved [RESOLVED] [2005] 1 format toolbar and 2 richtextboxes...

    My form has 2 richtextboxes on it and I have one toolbar with formatting buttons on the main mdi form, there won't be multiple instances of the child form.

    I'm trying to make it so when a RTF box gets focus, it sets a variable like this:

    RTFObject = ActiveRTF

    RTFObject being the variable and ActiveRTF the RTF box that just got focus. So when I press one of the format buttons, it works like:

    RTFOBject.SelectionFont = New Font(RTFOBject.SelectionFont, (RTFOBjectSelectionFont.Style Or FontStyle.Bold))

    My overall goal is to have just one format toolbar and when focus is given to either of the 2 richtextboxes, it will format the right box.

    Any ideas?

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Location
    Alaska
    Posts
    435

    Re: [2005] 1 format toolbar and 2 richtextboxes...

    Nevermind, my problem was I decalred RTFObject on the main form when I should of made it on the actual RTF form.

    Public RTFObject As RichTextBox

    RTFObject = ActiveRTF


    And on the main form, for the bold button:
    formSoftware.RTFObject.SelectionFont = New Font(formSoftware.RTFObject.SelectionFont, FontStyle.Bold)

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