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

Selection width not changing with font size

1 Answer 56 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Bradley
Top achievements
Rank 1
Bradley asked on 22 Oct 2012, 07:05 PM
On my RichTextBox if you type something in, select the text, and increase the font size the width of the selector is no longer spanning the width of the text.  See attached please.  Works fine with decreasing the font.

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 25 Oct 2012, 08:46 AM
Hello Bradley,

This is a known issue for us and it has already been fixed in 2012 Q3 version of the control, so you could give it a try. If you are not able to upgrade your project, you could use as a workaround BeginUpdate() and EndUpdate() methods of DocumentSelection after changing of the font size or when ChangeFontSizeCommand is executed:

public MainWindow()
{
    InitializeComponent();
   
    this.radRichTextBox.CommandExecuted += (sender, e) =>
        {
            if (e.Command is ChangeFontSizeCommand)
            {
                this.radRichTextBox.Document.Selection.BeginUpdate();
                this.radRichTextBox.Document.Selection.EndUpdate();
            }
        };
  
}

 I hope this solves your problem. Do not hesitate to contact us if you have other questions.


Kind regards,
Vasil
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Bradley
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or