RichTextBox

6 posts, 0 answers
  1. Jacques
    Jacques avatar
    135 posts
    Member since:
    Jun 2007

    Posted 08 May 2012 Link to this post

    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
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 09 May 2012 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 11 May 2012 Link to this post

    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 >>
  5. Marian
    Marian avatar
    3 posts
    Member since:
    Mar 2014

    Posted 06 Jun 2014 Link to this post

    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




  6. Marian
    Marian avatar
    3 posts
    Member since:
    Mar 2014

    Posted 06 Jun 2014 in reply to Marian Link to this post

    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
  7. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 06 Jun 2014 Link to this post

    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.
     
Back to Top
UI for WinForms is Visual Studio 2017 Ready