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,
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
Hi Dirk,
Good idea. :)
Thanks for checking. I have submited the request.
At the moment I use a UltraTextEditor and the command
System.Diagnostics.ProcessStartInfo("explorer", stest);
Sorry for the delay, I've been researching this question. But I couldn't find any way to do it.
You should Submit a feature request to Infragistics and perhaps this kind of functionality can be added in a future release.
In the mean time, the only thing I can think of is that you handle the ValueChanged event and examine the text to see if it's surrounded by a link tag, and if not, add it back in. It will probably be pretty tricky, though.
It is a standalone control. I must program a user control for editing a url. So I have tested the FormattedTextEditor. Its only a c# Windows From Application with User Control. The User control contains only the FormattedTextEditor.
We use actual V9.1.
Is this a standalone control or are you using it in a grid? If you are using the FormattedTextEditor in a grid, then the TreatValueAs property on the control is irrelevant. Only the grid settings matter. So you need to set the Style property on the grid column to URL.