Completed
Last Updated: 23 Aug 2016 09:03 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
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:
0 comments