Telerik Forums
UI for WinForms Forum
1 answer
23 views

we are using the RichTextEditor to display a DOCX file. HOwever, I can not for the life of me figure out to remove/close the document once it has been assigned to the Document property on the RichTextEditor control. I know this is probably simple, but I am just not seeing anything like a CLOSE(), EXIT(), CLEAR() and Setting Document = null crashes.  

 

TIA

Mark

Nadya | Tech Support Engineer
Telerik team
 answered on 25 Oct 2023
4 answers
26 views

Hello, 

Telerik have demo Richtexteditor - Document API project example with 3 buttons (bold, italic and underline) . Can you please send me any example or project how to add there two FlowDirection buttons (LTR and RTL) with toggled states as in the first look realization?

Thank you!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Oct 2023
2 answers
42 views

Is there a way to hide the File -> New Menu Option?

I tried this but it returns "Nothing" indicating the backstageTabItemNew item wasn't found.... maybe there's another name for it?

Dim FileNewItem As BackstageTabItem = TryCast(Me.RichTextEditorRibbonBar1.RibbonBarElement.BackstageControl.Items("backstageTabItemNew"), BackstageTabItem)

Nadya | Tech Support Engineer
Telerik team
 answered on 02 Oct 2023
1 answer
23 views

I'm capturing the event below

    Private Sub RadRichTextEditor1_CommandExecuting(sender As Object, e As Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs) Handles RadRichTextEditor1.CommandExecuting
        If TypeOf e.Command Is SaveCommand Then
            If e.CommandParameter = "pdf" Then
                'allow export to pdf
            Else
                e.Cancel = True

          End If
       End If

    End Sub

I was hoping to find

 If TypeOf e.Command Is SaveASCommand - but from what I can see, that doesn't exist.

The problem is - if the user clicks the Save Button or BackStage Save - I'm doing special processing to the database.

But if they click on Save As - It indicates that the user wants to 'export' the document to a pdf or to a word .docx

But in both cases - e.command is always SaveCommand.

It would have been nice to have a (1) SaveCommand and (2) SaveAsCommand

Anyway, is there any event that I can tap into so that these 2 methods can be dealt with differently?

I did add a handler for the SaveButton itself... and that works just fine.

AddHandler RichTextEditorRibbonBar1.QuickAccessToolBarItems(0).MouseDown, AddressOf SaveButton_MouseDown

Maybe you can show me how to create an addhandler for the BackStage Save Menu Option

And

For the BackStage SaveAs Menu Option

That would be of great help and probably solve my special handling needs.

Dinko | Tech Support Engineer
Telerik team
 answered on 13 Sep 2023
1 answer
33 views

The ribbon bar has a save button... and I'd like to add special behavior when the user clicks the save button.

Is there any way to intercept or override (with add handler perhaps) the save button click event?

Dinko | Tech Support Engineer
Telerik team
 answered on 07 Sep 2023
1 answer
35 views

I have a document generator which currently generates Word documents, and I’d like to replace it with the RichTextEditor control.

Has anyone tried anything like this? I’ve already replaced Excel with the RadSpreadsheet, and that was OK, albeit with a few restrictions, but the performance improvement made it worthwhile. But the Word generator is way more complicated, and uses all kinds of Word features, so just wondering if there are any gotchas.

Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 29 Jun 2023
3 answers
77 views

Hi Team,

We are planning to migrate Telerik.WinControls.RichTextEditor.dll (2023.1.314.40) in visual studio 2022.

We are unable to compile the program and getting an errors like below.

  • The type or namespace name 'RadDocument' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'StyleDefinition' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'BaselineAlignment' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'UnderlineType' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'Paragraph' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'RadTextAlignment' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'ListNumberingFormat' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'InsertTableForm' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'ListStyle' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'RtfFormatProvider' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'ITextBasedDocumentFormatProvider' could not be found (are you missing a using directive or an assembly reference?)
  • The type or namespace name 'TxtFormatProvider' could not be found (are you missing a using directive or an assembly reference?)
  • The name 'DefaultListStyles' does not exist in the current context
  • The name 'Span' does not exist in the current context
  • The name 'Unit' does not exist in the current context
  • The name 'TextStyle' does not exist in the current context
  • 'RadRichTextEditor' does not contain a definition for 'DocumentView' and no accessible extension method 'DocumentView' accepting a first argument of type 'RadRichTextEditor' could be found (are you missing a using directive or an assembly reference?)

What is an equivalent namespaces for following references? Could you please help on this below?

  • using Telerik.WinControls.RichTextBox;
  • using Telerik.WinControls.RichTextBox.FileFormats.Rtf;
  • using Telerik.WinControls.RichTextBox.Layout;
  • using Telerik.WinControls.RichTextBox.Lists;
  • using Telerik.WinControls.RichTextBox.Model;
  • using Telerik.WinControls.RichTextBox.Model.Styles;
  • using Telerik.WinControls.RichTextBox.UI;
  • using Telerik.WinControls.RichTextBox.FormatProviders;
  • using Telerik.WinControls.RichTextBox.FormatProviders.Txt;

Note: Its working fine in the Telerik.WinControls.RichTextBox.dll (2013.3.1127.40)

example program:

private void InitializeCurrentFontStyles(StyleDefinition styleDefinition) { try { UnderlineType underlineType = (UnderlineType)styleDefinition.GetPropertyValue(Span.UnderlineTypeProperty); this.radBtnUnderlineStyle.ToggleState = underlineType != UnderlineType.None ? ToggleState.On : ToggleState.Off; string fontFamiliy = (string)styleDefinition.GetPropertyValue(Span.FontFamilyProperty); this.radDropDownListFont1.SuspendSelectionEvents = true; this.radDropDownListFont1.Text = fontFamiliy; this.radDropDownListFont1.SelectedValue = fontFamiliy; this.radDropDownListFont1.SuspendSelectionEvents = false; float fontSize = (float)styleDefinition.GetPropertyValue(Span.FontSizeProperty); fontSize = (float)Math.Round(Unit.DipToPoint(fontSize), 1); this.EnsureFontSize(fontSize.ToString()); TextStyle fontStyle = (TextStyle)styleDefinition.GetPropertyValue(Span.FontStyleProperty); this.radBtnBoldStyle.ToggleState = fontStyle.HasFlag(TextStyle.Bold) ? ToggleState.On : ToggleState.Off; this.radBtnItalicStyle.ToggleState = fontStyle.HasFlag(TextStyle.Italic) ? ToggleState.On : ToggleState.Off; } catch (Exception ex) { RadMessageBox.SetThemeName("Office2007Silver"); RadMessageBox.Show(ex.Message, res_man.GetString("ProposalEntityMaster", PNxt_BL.Common.CultureInfo), MessageBoxButtons.OK, RadMessageIcon.Error); } using (InsertTableForm insertForm = new InsertTableForm()) { insertForm.Owner = this; insertForm.ThemeName = "Office2007Silver"; if (insertForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.radRichTextBox1.InsertTable(insertForm.RowsCount, insertForm.ColumnsCount); } } this.radRichTextBox1.DocumentView.Caret.Hide(); }


Thanks,

Rajkannan


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 31 May 2023
1 answer
58 views

Hello,

When i put the simplified layout on the ribbon bar to On, the radRichTextEditor who is associated stay stays in its place instead of sticking to the ribbon. That's a lot of wasted space. How do I do this? i don't find the property ...

i found an exemple here : Nouvelle barre de ruban simplifiée moderne dans Telerik UI pour WinForms

That is exactilly what i want

Thank you (and sorry for my english !)

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 May 2023
1 answer
36 views

I need a Solution for export Thai (or any other complex Language) document as pdf. Is there any solution for now?

I'm using Telerik rich Text editor for windows form

Yoan
Telerik team
 answered on 24 Apr 2023
2 answers
54 views

I need to show the user some XML, but formatted nicely (identing, colors etc).

Can I use RichTextEditor for this? If so how (vb.net please!).

I don't need to edit the XML now, but I will need to in future (hence not using a Browser-type control)

Thanks

 

Ian
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 07 Mar 2023
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
Menu
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Barcode
Styling
ColorBox
PictureBox
Callout
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?