hi,
I want to add some string(expression : e.g. #{name}# or ${name}$). When I add this expression it should appear as link in the UltraFormattedTextEditor. And also when I clcik on that it should trigger an event.
is there any way to do that?
If yes, Please give me some sample example
Thanks in advance,
Regards,
Santosh
Hi Santosh,
I find that the easiest way to learn how to do something in the UltraFormattedTextEditor is to use the designer. If you place an UltraFormattedTextEditor on a form and go to the Value property, you can click the button to bring up the designer.
The designer has a button on the toolbar to allow you to add a link. You can use the two tabs to see what the control will look like and also to see the XML that is created to achieve that look.
So you could set the Value on the control to something like this:
<a href="url">Display text</a>
Then you just handle the LinkClicked event and set e.OpenLink to true. This will prevent the control from trying to launch the URL you provided automatically. You can then handle it however you want.
Hi Mike,
is there a way to click the link without having to press the Ctrl Button?
If the control has a mixture of formatted text and also has links in it, then I thik you always have to hold control. This is the only way the control can distinguish between when the user wants to follow the link and when the user just wants to place the caret at a certain point in the text.
If you are using the UltraFormattedLinkLabel, instead of the UltraFormattedTextEditor, then I suspect you don't have to hold CTRL, since no editing is possible, anyway.