in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Using dialog return values with non-standard controls

Last post 03-01-2007 8:31 PM by C1_SergeiS. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-27-2007 3:50 PM

    Using dialog return values with non-standard controls

    I also need to use the dictionary with a non-standard control. I have methods to traverse and parse the text into words to check but I am not sure how to get the returns from the dialog window.

    correction = Me.NotesC1Spell.CheckString(word, C1.Win.C1Spell.BadWordDialogEnum.EnglishDialog) returns the new word and Me.NotesC1Spell.CancelSpelling handles the cancel button but how about ignore, ignoreall, changeall? How do I know these buttons where pushed?


  • 02-27-2007 7:53 PM In reply to

    Re: Using dialog return values with non-standard controls

    Hi,
     
    1. There is a C1Spell.DialogAction event. You can deterime which button was pressed there, Add, Cancel, Change, ChangeAll, Ignore or IgnoreAll.
    2.You can also implement your own dialogs for C1Spell. Check CustomUI sample that shows how to do it.
    3. If your non-standard control is System.Windows.Forms.Control descendant, you can create a new class derived from your control and implement IC1TextBoxBaseWrapper (plus C1TextBoxBaseAdvancedWrapper optionally) interfaces. Those interfaces allow C1Spell working with a control like usual with TextBox.
     
    Regards,
    Sergey.
    <tclaffy> wrote in message news:191999@test.componentone.com...
    I also need to use the dictionary with a non-standard control. I have methods to traverse and parse the text into words to check but I am not sure how to get the returns from the dialog window.

    correction = Me.NotesC1Spell.CheckString(word, C1.Win.C1Spell.BadWordDialogEnum.EnglishDialog) returns the new word and Me.NotesC1Spell.CancelSpelling handles the cancel button but how about ignore, ignoreall, changeall? How do I know these buttons where pushed?




    http://home.componentone.com/cs/forums/191999/ShowPost.aspx

  • 02-28-2007 12:44 PM In reply to

    Re: Using dialog return values with non-standard controls

    This is the Qwhale syntax editor. We already had a base inheritance level so I added the interface and the checkspelling works as you inidicated. Howver, the checktyping throws an error of invalid window handle on the same control with the following code:

    Me.NotesSpellCheck.CheckTyping(Me.SyntaxEditNoteText)
    Me.NotesSpellCheck.IntegerTag = 1
  • 03-01-2007 8:31 PM In reply to

    Re: Using dialog return values with non-standard controls

    Seems you only implemented IC1TextBoxBaseWrapper interface, this is sufficient for C1Spell.CheckControl method. If you want check typing functionality you would need to implement IC1TextBoxBaseAdvancedWrapper as well.
     
    Sergey.
    <tclaffy> wrote in message news:192053@test.componentone.com...
    This is the Qwhale syntax editor. We already had a base inheritance level so I added the interface and the checkspelling works as you inidicated. Howver, the checktyping throws an error of invalid window handle on the same control with the following code:

    Me.NotesSpellCheck.CheckTyping(Me.SyntaxEditNoteText)
    Me.NotesSpellCheck.IntegerTag = 1

    http://home.componentone.com/cs/forums/192006/ShowPost.aspx#192053

Page 1 of 1 (4 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.