I'm having issue with my RichTextBox and some funky UI stuff, Its cutting off my Characters (see Link at the bottom of this post) And also the Cursor in this instance appears to be BEFORE the H, but is actually at the end of the H...
<
telerik:RadRichTextBox
FontFamily
=
"Arial"
FontSize
=
"9"
DocumentInheritsDefaultStyleSettings
=
"True"
BorderThickness
=
"0"
ScrollViewer.HorizontalScrollBarVisibility
=
"Disabled"
VerticalScrollBarVisibility
=
"Auto"
/>
http://www.flickr.com/photos/57960866@N06/5707505816/in/photostream
Any help would be appreciated.
16 Answers, 1 is accepted
Thank you for getting to us about the strange behavior you are observing.
The misplaced caret is a bug related to the specific font and size, which we will look into and hopefully, fix, for the next release.
As for the cutting of the last character, do you, by any chance, have a default style for all TextBlocks in your application? RadRichTextBox uses TextBlocks internally and they might be taking over this style. We will prevent that on our end in the next release, too, but as a workaround, you can set a style in the resources of the RichTextBox:
<
telerik:RadRichTextBox
FontFamily
=
"Arial"
FontSize
=
"9"
DocumentInheritsDefaultStyleSettings
=
"True"
>
<
telerik:RadRichTextBox.Resources
>
<
Style TargetType="TextBlock"
/>
</
telerik:RadRichTextBox.Resources
>
</
telerik:RadRichTextBox
>
I hope that helps.
Iva
the Telerik team
I'm using a control that has a RadRichTextBox inside, when displayed, the end of the texte in the document is cut off (as if it is hidden under the vertical scrollbar space). Do you have any clue?
<Telerik:RadRichTextBox DocumentInheritsDefaultStyleSettings="True"
x:Name="ctlRadRichTextBox"
DockPanel.Dock="Bottom"
IsContextMenuEnabled="False"
IsSpellCheckingEnabled="False"
IsSelectionMiniToolBarEnabled="False"
VerticalScrollBarVisibility="Auto"
DocumentContentChanged="RadRichTextBox_DocumentContentChanged"
PS: The document content is binded in RTF format.
I couldn't reproduce the problem you have described. Can you please provide us with a simple project illustrating the problem attached to a support ticket.
Before that you could check if everything is ok with the following attributes if you are using them: width, margin and padding inside your user control, because the RadRichTextBox is a bit wider than the other containers.
We would also appreciate it if you also specified which version of the controls you are using, e.g. 2011.3.1116.40.
Mihail
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I am using RadRichTextBox control for preview in WPF. Whena Date text is italicized, the last character is getting cut off but when the change the font style back to normal, i see the complete date...
How to control this behaviour
Thanks
Vishnu
We are unaware of any similar issues and I could not replicate this. Would you mind sharing some additional details such as:
- Are you able to replicate the problem in our click-once examples and what steps are you executing?
- What exactly is the setup of your project?
- What type of document is shown when the issue is observed?
I'm looking forward to your reply.
Regards,
Petya
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
<telerik:RadRichTextBox Grid.Row="2" IsReadOnly="True" x:Name="rtbHtmlTestRad" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" />
Note:1) I am constructing the text programatically using RadDocument/Rad Span for displaying text. The Font settings are then applied to RadSpan, which are then added to Paragraphs. Different text in the document has different Font settings like Heading in bold, dates in Italic, body in Normal
2) The cutoff issue is also observed for regular text when changed to bold and increased Font Size
- Are you able to replicate the problem in our click-once examples and what steps are you executing?
- What exactly is the setup of your project?
- What type of document is shown when the issue is observed?
Thanks
Vishnu
Unfortunately, I am still unable to reproduce the behavior you are observing. Please try to provide us with a sample project which demonstrates the problem and we will do our best to address it.
Thank you for your cooperation!
Regards,
Petya
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
In the screenshots you can see the formatting differences between Normal, Bold, and Bold Italic for 18pt Times New Roman. Other font families and other font sizes also exhibit this behavior but these are illustrative. This issue presents for Italic without Bold as well but showing the Bold Italic highlights the issue nicely.
In each screenshot I have highlighted the same sections of text for visual reference.
What you see in the Normal selection is the text displayed with no cutoff and fills up seven lines almost exactly. In the Bold selection you see that the text is also displaying with no cutoff and fills up a majority of eight lines. The problem is with the Bold Italic.
First note the words are being cut off in the middle. Also note that the Bold Italic takes up about eight and a third lines (less than Bold but more than Normal). This is similar to how Word behaves - the Bold Italic text takes up less space than the plain Bold text.
To describe this is non-code terms I do the following
- Create a RadDocument
- Add a Section
- Add a Paragraph and set the paragraph's font size to 1.25 the value that will be in the text. All of the text in the paragraph will be formatted with the same family, size, and style.
- Add a Span and set the family, size, and style and then add the text to it.
You will also note in the screenshots the "Effective Date" and "Revision Date" are displaying fully. This only happens when I append a non-breaking space (NBSP) to the end of the Italic date. If I do not append the NBSP then the last character of the date is cut off. A plain space character will leave the date cut off as well so a NBSP is required here.
More coming later today.
Many thanks!
I pulled out a utility called "Snoop" (http://snoopwpf.codeplex.com/releases/view/87261) to try and see if there are any differences in the application structure that might be of note. I've attached a screenshot from the sample application (sampleeditingcontext.png) and the main application. You can see the container hierarchy and see that the application hierarchy is significantly more complex than the sample app hierarchy.
Additionally what these screenshots are showing are the EditingContext for the RadRichTextBox in both applications. To my surprise the context for the sample application has *much* more data. That being said I'm not certain how much the "more" matters. The one thing that does pique my interest though is the context for the application showing the difficulty has a Font Size of 14 where the sample app does not.
What does the EditingContext do? How are these properties set? Are they inherited from someone else? Does the Font Size matter in terms of how the text box will render text that is set at 10px instead of 14?
Help please.
Actually you are observing differences in CurrentEditingStyle property, which value may depend on the caret position and the loaded document.
Anyway, sometimes problems similar to yours may occur if a style is implicitly set to TextBlock or some other element which is used internally by the RadRichTextBox for visualizing the content. Could you try to remove all custom styles (especially for TextBlock) in your application? If this is the problem, you may be able to work around it by re-setting the default TextBlock style only in the scope of RadRichTextBox.
Let us know if this helps.
Regards,
Boby
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
</Style>
<telerik:RadRichTextBox Grid.Row="4" IsReadOnly="True" x:Name="rtbHtmlTestRad" LayoutMode="Flow" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" Margin="0" Padding="10" BorderThickness="1" Style="{x:Null}" >
<telerik:RadRichTextBox.BorderBrush>
<SolidColorBrush Color="#FFD0D0D0" telerik:Windows8Colors.Color="Basic"/>
</telerik:RadRichTextBox.BorderBrush>
</telerik:RadRichTextBox>
If the issue is with the TextBlock style is there another (better?) way of setting that?
rjsjr
Could you specify the version you are using, as in the recent versions RadRichTextBox is not affected from the implicit styles set to TextBlock, which may make my suggestion irrelevant depending on the version.
Also ensure that you are not setting any of the properties of the TextOptions class in the scope of RadRichTextBox, as these are not supported by the control.
If the mentioned suggestions don't help, please try to reproduce the problem in sample application and send it to us in a support ticket for further investigation.
Regards,
Boby
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
I don't think I'm doing anything with TextOptions at all but will look again.
I have tried creating a sample project replicating code and layout and the sample project does not show the issue. We're working with some internal resources to try and figure this out and if I can't get it figured out tomorrow I'm going to send it to y'all on Monday. Hopefully your upload facility will take a really big file. If not, we have a corporate facility that I can send you the code with if I have an email address.
Thanks!
In a (I thought) completely unrelated .xaml file I found
TextOptions.TextFormattingMode="Display"
THANK YOU! THANK YOU! THANK YOU!
Hi telerik team,
I am doing a editor base on radrichtextbox telerik wpf.
And I have an issue about "word cut off".
Please help and provide the solution for this case.
The steps to reproduce:
1. Input test
2. Change font family is "Impact"
3. Change the font size is "22"
4. Change the format is "Italic"
=> See the issue happened.
Thank you!
Hi Jhon,
I was able to reproduce the observed issue. I have logged it on your behalf. You can track its progress, subscribe to status changes, and add your comment to it here. I have updated your Telerik points well.
Unfortunately, due to the nature of the issue, I cannot suggest a workaround.
Thank you for your understanding.
Regards,
Dimitar
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.