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

RadRichTextBox executing time height

3 Answers 49 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
JOSE
Top achievements
Rank 1
JOSE asked on 22 Jul 2013, 10:22 AM
We are using a RadRichTextBox and we want to know the actual height of  the RadDocument you have inside. How  can we get the real height of the document depending on its content?.

3 Answers, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 25 Jul 2013, 09:03 AM
Hello JOSE,

Would you mind sharing why you need to know the actual height of a RadDocument? Currently this is not possible, however we might be able to suggest another approach for what you are trying to achieve.

I'm looking forward to your reply.

Regards,
Petya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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 >>
0
JOSE
Top achievements
Rank 1
answered on 05 Aug 2013, 08:42 AM
Hello Petya,
 
Thank you for your fast answer.

We have a Canvas where the user can add different elements, one of them is the RadRichTextBox, he can write in it all he wants and the scrolls are enabled while doing it. Afterwards, the user can print that document into a RadDocument, to be shown into the PDF Viewer, for that we use the ImageTools libraries to convert the canvas into images that are splitted and added to the RadDocument into all the pages that are necesary. We need the height of the RadDocument inside the RadRichTextBox because we do not want to have the scrolls at that moment, we want to resize it to the actual heigth of its content so all the information can be shown in the final document that is shown using the viewer.

Hope this explanation exposes our situation.

Regards.
0
Iva Toteva
Telerik team
answered on 08 Aug 2013, 08:01 AM
Hi Jose,

We are not sure how you have implemented this scenario and if using RadRichTextBox would be the appropriate control to use. 

When it comes to the height of the document you are interested in  - it is in Flow LayoutMode, is that correct? 
In that case, you could use the DesiredSize property of the document. Please try this out and let us know if you encounter any issues.


Regards,
Iva Toteva
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
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
JOSE
Top achievements
Rank 1
Answers by
Petya
Telerik team
JOSE
Top achievements
Rank 1
Iva Toteva
Telerik team
Share this question
or