Sign In  Sign Up Live-Chat

newbie WinForm question - RichTextBox & TextBox?

Last post 05-05-2008, 6:01 PM by mdelvecchio. 2 replies.
Sort Posts: Previous Next
  •  05-01-2008, 5:22 PM 125060

    newbie WinForm question - RichTextBox & TextBox?

    hello,

    we purchased and are using Spell for our Windows app. i based our implementation on the included demo project. cool.

    but the demo projects define the SpellChecker class such that it takes in a RichTextBox as a parameter. My app needs to check for RichTextBoxes as well as TextBoxes.
     
    What is the suggested way to do this?


    thanks
    matt
     
  •  05-01-2008, 6:34 PM 125067 in reply to 125060

    Re: newbie WinForm question - RichTextBox & TextBox?

    Hi,

    Change constructor code for FormSpell as follows:

       public FormSpell(TextBoxBase textBox, Spell spell)
       {
          this.textBox = textBox;
          this.spell = spell;
          InitializeComponent();
       }

             ...

       private TextBoxBase textBox;


    Oleg Korostylev
    Lead Developer
    Aspose Vladivostok Team
    About Us
    Contact Us
     
  •  05-05-2008, 6:01 PM 125506 in reply to 125067

    Re: newbie WinForm question - RichTextBox & TextBox?

    great, thank you.

    FYI -- that is definitely something that should be fixed in the demo code. Demo code is the #1 important place to ensure your product is demonstrated properly, using its best practices. showing how to do things *right* saves everybody a lot of time.

    thanks
    matt
     
View as RSS news feed in XML