Unplanned
Last Updated: 30 Mar 2016 13:09 by ADMIN
ADMIN
Julian Benkov
Created on: 12 Feb 2013 06:51
Category: Editors
Type: Bug Report
2
FIX. RadSpellChecker - does not work when the default English dictionary is changed and AllAtOnce mode is applied
example:

Imports Telerik.WinControls.UI
Imports Telerik.WinControls.RichTextBox.Proofing
Imports System.IO
Imports System.Globalization

Public Class Form1

    Dim radTextBox1 As RadTextBox = New RadTextBox
    Dim radSpellChecker1 As RadSpellChecker = New RadSpellChecker

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        radTextBox1.Parent = Me.Panel1
        radTextBox1.Multiline = True
        radTextBox1.Dock = DockStyle.Fill

        radSpellChecker1.SpellCheckMode = SpellCheckMode.WordByWord



        Dim textBoxControlSpellChecker As IControlSpellChecker = Me.radSpellChecker1.GetControlSpellChecker(GetType(RadTextBox))
        Dim documentSpellChecker As DocumentSpellChecker = TryCast(textBoxControlSpellChecker.SpellChecker, DocumentSpellChecker)
        Dim ms As New MemoryStream(My.Resources.sv_SE
                                   )
        Dim dictionary As New WordDictionary()
        dictionary.Load(ms)

        documentSpellChecker.AddDictionary(dictionary, CultureInfo.CurrentCulture)

        radSpellChecker1.SpellCheckMode = SpellCheckMode.AllAtOnce

    End Sub

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
     
        Me.radSpellChecker1.Check(Me.radTextBox1)
    End Sub
End Class
0 comments