Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Rich text with multiline

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
Happs



Joined: 13 Jul 2011
Posts: 62
Location: Sydney, Australia

PostPosted: Wed Jan 16, 2013 6:23 am    Post subject: Rich text with multiline Reply with quote

Hi,

I need to display multi line of rich text. Text could have bold, italic, image etc. Some cell may have multi line others could be single line, so it need to format accordingly.

Do you have any suggestions about best approach?

Thanks.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Jan 16, 2013 11:34 pm    Post subject: Reply with quote

You can use RichText - see the RichText sample code. To add multiple lines you use the \line markup. For example if I change the sample code to:

Code:
const string format = @"{\rtf1\ansi Part: \b \{0\}\line Second\par}";


This will add a second line to each row with the text "Second". You can find online guides to the RTF syntax but a simple approach is to just use Word pad to generate the required RTF and then open it in Notepad to see the codes.

If you are going to use multiline text then you will probably want to set the AutoFitHeight property on the RowBinding to true so that the rows will automatically expand to find the displayed text.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Happs



Joined: 13 Jul 2011
Posts: 62
Location: Sydney, Australia

PostPosted: Wed Jan 16, 2013 11:56 pm    Post subject: Reply with quote

Thanks for your prompt response, I will try your suggestions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group