Page 1 of 1
Hyperlink in Textbox?
Posted: Thu Apr 23, 2009 5:00 pm
by iansml
Is there any way to add an annotation that contains a hyperlink to external URL or document? An extension to the TextAnnotation control possibly?
Thanks.
Re: Hyperlink in Textbox?
Posted: Thu Apr 23, 2009 5:59 pm
by Alex
Hello,
What functionality do you need?
Best regards, Alexander
Re: Hyperlink in Textbox?
Posted: Thu Apr 23, 2009 6:26 pm
by iansml
Alex wrote:Hello,
What functionality do you need?
Best regards, Alexander
Hi Alex,
I'm currently evaluating a number of 3rd party products to replace some legacy document annotation code that has been hand-crafted using GDI. One of the legacy annotations I must replace is a kind of textbox that allows you to select a URL and add a textual description. The textbox displays the description as a standard hyperlink (blue, underlined) which launches the URL when clicked.
I can't find any control that will do the job. Is there one, or is there any way I can extend an existing one (e.g. textbox/rectangle)?
Thanks,
Ian
Re: Hyperlink in Textbox?
Posted: Mon Apr 27, 2009 1:16 pm
by Alex
Hello Ian,
You can use StampAnnotation as a base for UrlAnnotation. Ability to receive notification when mouse event is fired (clicked, double clicked, etc) will be added in 2-3 weeks.
Best regards, Alexander
Re: Hyperlink in Textbox?
Posted: Mon Apr 27, 2009 5:58 pm
by iansml
Alex,
Would you have any example code for doing this? Is there a chance of this control being a standard annotation in the future?
Thanks,
Ian
Re: Hyperlink in Textbox?
Posted: Tue Apr 28, 2009 8:51 am
by Alex
Yes, we will add UrlAnnotation to a list of standard annotations in next version of library.
Best regards, Alexander
Re: Hyperlink in Textbox?
Posted: Tue Apr 28, 2009 10:30 am
by iansml
That's great. Thanks.
1) When will the next version be made available?
2) Do you have any example code showing how I could extend a current control as a workaround in the meantime?
Thanks again. Our evaluation of your product is going very well and I've been impressed by the turnaround of you and your team. We just a few remaining issues that I've raised on this forum that I need to resolve before we can commit to purchase.
Regards,
Ian
Re: Hyperlink in Textbox?
Posted: Wed Apr 29, 2009 8:38 am
by Alex
Hello Ian,
When will the next version be made available?
New version of VintaSoftImaging.NET Library will be released in 2-3 weeks.
Do you have any example code showing how I could extend a current control as a workaround in the meantime?
Next code creates StampAnnotation object with "URL style":
Code: Select all
StampAnnotation ann = new StampAnnotation();
ann.Text = "Url text";
FontFamily fontFamily = new FontFamily("Arial");
ann.Font = new Font(fontFamily, 15, FontStyle.Underline);
ann.Border = false;
ann.BorderColor = Color.Transparent;
ann.StampColor = Color.Blue;
ann.ZOrder = zOrder;
zOrder++;
annotationViewer1.BuildAnnotation(ann);
Mouse click event cannot be defined at the moment.
Best regards, Alexander