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

Text is half hidden when RadRichTextBox is only 1 line

1 Answer 89 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 16 Aug 2013, 04:43 PM
Hi,

I am using RadRichTextbox for one line input only.  Basically, I want it to work as regular RadTextBox. I need use this control instead of regular RadTextBox for mail merge purposes.  The text is half hidden.  If I resize the window or click inside the textbox it normalizes.  Is there a setting I need to set to fix this or is this a bug?  Any workaround?

Here is my simple code.  See attached image file to see how it looks.

<telerik:RadRichTextBox x:Name="radRichTextBox" HorizontalAlignment="Stretch" Height="26" ScrollViewer.VerticalScrollBarVisibility="Disabled" AcceptsReturn="False" AutoInsertHyperlinks="False" LayoutMode="FlowNoWrap" VerticalScrollBarVisibility="Disabled">
            <telerik:RadDocument>
                <telerik:Section>
                    <telerik:Paragraph>
                        <telerik:Span Text="This is a test"/>
                    </telerik:Paragraph>
                </telerik:Section>
            </telerik:RadDocument>
        </telerik:RadRichTextBox>

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 20 Aug 2013, 03:43 PM
Hi Michael,

Paragraphs as part of RadDocument's structure have some properties that affect the way they look. You can find more about these properties and how to customize them here 

Basically, the concrete issue at hand is related to the SpacingAfter property which has a default value of 9pt. In order to resolve the issue you can simply set it to 0 either in XAML or code-behind:
<telerik:RadDocument>
    <telerik:Section>
        <telerik:Paragraph SpacingAfter="0">
            <telerik:Span Text="This is a test"/>
        </telerik:Paragraph>
    </telerik:Section>
</telerik:RadDocument>

Let us know if you face other issues or have further questions.

Regards,
Petya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
Tags
RichTextBox
Asked by
Michael
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or