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

RichTextBox

5 Answers 53 Views
RichTextBox (obsolete as of Q3 2014 SP1)
This is a migrated thread and some comments may be shown as answers.
Jacques
Top achievements
Rank 2
Jacques asked on 08 May 2012, 02:38 PM
Hi there, 

I'm trying the RichTextBox and something doesn't seem right. In the properties window if I add a value for the Text property and run the app it doesn't show. 
Same if I dynamically add a RichTextBox at runtime and try and apply a value to the text property... nothing shows up. 

Questions:
1. Why doesn't the text property work? 
2. Does winforms come with the equivalent of Asp.net for Ajax RadEditor and is RichTextBox it? 

Regards,
Jacques

5 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 09 May 2012, 02:46 PM
Hello, 

The RadRichTextBox does not have a (usable) text property because of the different formats. To just import some text you would specify 
this.radRichTextBox1.Insert("The Text");

However, it's important to read the FAQs and the section on Import/Export

hope that helps
Richard
0
Stefan
Telerik team
answered on 11 May 2012, 07:46 AM
Hello,

I am marking Richard's post as answer, since this is the right way to go.
 
All the best,
Stefan
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Marian
Top achievements
Rank 1
answered on 06 Jun 2014, 11:39 AM
Hi I have an issue using Telerik Rich Text Box for WinForms (Version 2014.1.402.40).

The scenario is very simple

I have this piece of html

<html xmlns=\"http://www.w3.org/1999/xhtml\">
    <head><meta content="TX18_HTM 18.0.402.500" name="GENERATOR" />
        <title>
        </title>
    </head>
    <body style="font-family:'Arial';font-size:12pt;text-align:left;">        
        <ol >
            <li >
                <p >
                    <span style="color:#000000;font-weight:bold;">Welche Laufzeit hat der Beherrschungs- und Gewinnabführungsvertrag der Truck &amp; Bus GmbH mit der Volkswagen AG?</span>
                </p>
            </li>
        </ol>
    </body>
</html>

(I place it in test.html)

and

Then I am using this code to import html

            var tr = new StreamReader("c:\\text\\test.html");  // here is my html above
            var html = tr.ReadToEnd();
            var provider = new HtmlFormatProvider();
            var radDocument =  provider.Import(html);

The rich content is malformed as in the attached picture




0
Marian
Top achievements
Rank 1
answered on 06 Jun 2014, 12:07 PM
I used LayoutMode  FlowNoWrap and it works ( the problem turned out to be from wrapping the rich content not from rendering it)

Thank you,
Marian
0
Stefan
Telerik team
answered on 06 Jun 2014, 12:13 PM
Hello Marian,

Thank you for writing.

May I please ask you to open a separate thread with your question, as it is not related to the initial subject of this thread. Keeping just one question in a thread, makes the forums easy to search.

You can find some guidelines for using the forums here: http://www.telerik.com/forums/important-information-on-using-the-telerik-forums-97adf04423ea.

Thank you for the understanding.

Regards,
Stefan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
RichTextBox (obsolete as of Q3 2014 SP1)
Asked by
Jacques
Top achievements
Rank 2
Answers by
Richard Slade
Top achievements
Rank 2
Stefan
Telerik team
Marian
Top achievements
Rank 1
Share this question
or