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.
Appologies for replying to an old thread but i experience this issue still in version 11.1.20111.2009 (have yet to update to latest release).
For those people that are searching for a solution i found that easiest way to have a new entry be recognized immediately as a URL is to simply store the text property in the value property again in the lostfocus event.
Private Sub txtEMail_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtEMail.LostFocus
txtEMail.Value = txtEMail.Text
End Sub
EDIT: validating events works too.
Obviously would still be nice the control would do this as soon as you type something. :)
Kind regards,Jacob Iedema
Hi Mike,
I run in an issue with the UltraFormattedTextEditor. I have made all things you have discripes in your post.
It works well.With ctrl I can click on the link and the page will be open.
Now the problem: I mark and delete the url and type in a new url, but the editor don't detect that it's a new url.
Any idea what is missing?
I have set TreatValueAs = TreatValueAs.URL
Thanks.
Bye
Dirk
is there a way to click the link without having to press the Ctrl Button?