Completed
Last Updated: 23 Aug 2016 09:03 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 09 Aug 2016 06:18
Category: RichTextEditor
Type: Bug Report
0
FIX. RichTextEditorRibbonBar - the "Insert Table" string in the RadMenuInsertTableItem's drop down is missing in the localization strings
Workaround: use a custom RichTextEditorRibbonBar

Public Class CustomRichTextEditorRibbonBar
Inherits RichTextEditorRibbonBar

    Dim headerText As String
    Protected Overrides Function GetInsertTableItems() As RadItemCollection
        Dim collection As RadItemCollection = MyBase.GetInsertTableItems()
        Dim headerItem As RadMenuInsertTableItem = TryCast(collection(0), RadMenuInsertTableItem)
        headerText = "My Header Text"
        Dim fi As FieldInfo = GetType(RadMenuInsertTableItem).GetField("header", BindingFlags.NonPublic Or BindingFlags.Instance)
        Dim header As LightVisualElement = fi.GetValue(headerItem)
        header.Text = headerText
        AddHandler header.TextChanged, AddressOf header_TextChanged
        Return collection
    End Function

    Private Sub header_TextChanged(sender As Object, e As EventArgs)
        Dim lve As LightVisualElement = TryCast(sender, LightVisualElement)
        If lve.Text = "Insert Table" Then
            lve.Text = headerText
        End If
    End Sub
End Class
Attached Files:
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments