I would like to swap out a RichTextBox in favor of the UltraFormattedTextEditor, but I am having a problem with getting links to show up. The control will be used as a log viewer which will not be editable. The logs which it will display will contain URLs as well as plain text. The in box RichTextBox has the DetectUrls property which correctly auto identifies the URLs and formats them accordingly (underlined with blue forecolor). I cannot seem to get this same functionality out of the UltraFormattedTextEditor. I have tried working with the TreatValueAs property, but that doesn't seem to do anything. I have tried the sample application "Ribbon With FormattedEditor". That sample does show how to insert links into the control while in edit mode, but I have log files which need to be viewed in the control and have their URLs auto detected. The sample's use of the TreatValueAs property also does not seem to do anything. I am using version 2008.3 with the latest hotfix.
Any advice or help on this issue is greatly appreciated.
Thanks,
Justin
Hi Justin,
Okay, but my answer is still essentially the same. There's no auto-detection of URLs in the FormattedTextEdtor. You will have to detect the URLs in the text yourself and modify the Value of the control to make them into links.
Hi Mike,
Thanks for the info, however; this editor isn't for a grid. I have a simple log viewer form. Currently, I am using the in box RichTextBox, and would like to swap it out for the UltraFormattedTextEditor, but if there is no way to easily have it auto detect the urls, then I'll just stick with the RichTextBox.
The UltraFormattedTextEditor doesn't have any auto-detection of URLs. The URLs have to be specifically encoded into the XML.
You could code this to detect the URLs yourself, of course. If you want to do this without changing the actual data, then what I would do is hide the real bound column in your grid, then add an unbound column to display the data you want. Then you can use the grid's InitializeRow event to take the value fom the bound column and modify the text for display.