This is a migrated thread and some comments may be shown as answers.

SpellCheck for radTextBox

1 Answer 109 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mat
Top achievements
Rank 1
Mat asked on 19 Sep 2010, 07:54 AM
Hello everybody,

can anybody tell me if it is possible (and if how) to use windows default spellchecking feature?

Below there is a complete codesippit how to accomplish this with a standard control. In this sample a textBox will be added on Form1.vb. I want to do exactly the same with a radTextBox. Type some missspelled text an you will see the spellCheck feature.

Thanks for answering.
Mat

###

'Reference:
'          PresentationCore.dll
'          PresentationFramework.dll
'          WindowsFormsIntegration.dll
'          WindowsBase.dll


Imports System.Windows.Forms.Integration


Public Class Form1

    Private WithEvents txt As New MySpellCheck

    Public Sub New()
        InitializeComponent()

        Me.Controls.Add(txt.ElementHost)

    End Sub

End Class


Public Class MySpellCheck
    Inherits System.Windows.Controls.TextBox


    Public Sub New()
        Dim eh As ElementHost = New ElementHost
        System.Windows.Controls.SpellCheck.SetIsEnabled(Me, True)
        With eh
            .Child = Me
        End With
        Me.ElementHost = eh
    End Sub


    Private _elementhost As ElementHost
    Public Property ElementHost() As ElementHost
        Get
            Return Me._elementhost
        End Get
        Set(ByVal value As ElementHost)
            Me._elementhost = value
        End Set
    End Property

End Class

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 23 Sep 2010, 09:57 AM
Hi Mat,

Thank you for contacting us.

This code replaces the standard WinForms textbox with the one existing in WPF. The standard textbox control does not support spell checking. Our framework uses the textbox that comes with WinForms and it cannot be replaced. Nevertheless, adding spell checking capabilities is an interesting feature and we will consider it for a future release.

Should you have any other questions, do not hesitate to write me.

Best wishes,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Mat
Top achievements
Rank 1
Answers by
Jack
Telerik team
Share this question
or