Cursor in ReadOnly mode

2 posts, 0 answers
  1. NrupalC
    NrupalC avatar
    11 posts
    Member since:
    Apr 2010

    Posted 13 Feb 2012 Link to this post


    I would like to achieve this:
    1. Cursor should be of type Cursors.Hand on any area of the RadRichTextBox. (WHY?) The application I am creating requires good visual quality and the cursor jumping between an IBeam and Arrow/Hand is not acceptable.
    2. Should be able to set the Cursor to a value and it must hold the same value at all times.
    3. The setting a custom cursor is required only in the ReadOnly Mode.

    Placing a rectangle over RadRichTextBox is not a solution as I will loose the hyperlink feature (Even though I need this only in the read only mode).

    I have tried:
    1. Setting the cursor on all elements programmatically (Document, Document.Children and so on...)
    2. Setting the Cursor on all elements by walking down the visual tree (this, I haven't spent much time on but tried it). I wouldn't want to go this way as it takes a performance hit to do this.

    Am I missing something or is it possible to get hold of the 'UIInlinesLayer' and set the cursor on each of its children.

  2. Alex
    Alex avatar
    129 posts

    Posted 16 Feb 2012 Link to this post

    Hi Nrupal,

    Thank you for the time taken to describe your scenario. Unfortunately in the current version there is no easy way to control how the cursor changes when hovering over different elements inside the RadRichTextBox. However there are a couple things you can try.

    First you can change the HyperlinkNavigationMode of the rich text box to Click. This way the cursor over hyperlinks will always be Hand and they will be activated on Click (the default is Ctrl+Click). Actually the HyperlinkNavigationMode property was intended exactly for scenarios when the rich text box is in read-only mode.  

    So the following setup:

    <telerik:RadRichTextBox Cursor="Hand" IsReadOnly="True" HyperlinkNavigationMode="Click" />

    will work quite well when showing documents in flow layout mode.

    If you want to achieve the same behavior when the layout mode is paged there is also a workaround but some additional work is required to define a custom UILayer with cursor hand. More information on UILayers can be found here.

    Please let us know if this works for you or if you need more help.

    All the best,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top