472,143 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

inserting a linklabel progammably into a richtextbox

I am looking for a way to mimic some of the functionality of a web page
without writing html (or I am looking to someone to point out something
really obvious that I am over looking)

Currently I read out some data into a dataset then appending it to a
richtextbox. So far so good. Some of the fields that I append are paths to
documents. I would like to be able to click on the paths (like a hyperlink)
I am able to create a linklabel at runtime and set its event handler I am
unable to place it where I would like. I was hoping to richtextbox.append
for the control but I cant seem to find a way to do this.

any help would really be appreciated
Nov 20 '05 #1
1 5233
I'm not aware of any way to insert a LinkLabel (or other control) into a
RichTextBox. However, there are several other options which might work:

1. The RichTextBox will generate hyperlinks from URLs by setting the
DetectUrls to True. However, the link has to be to a bona fide URL -- you
can't have custom links, like you can with the LinkLabel.

http://groups.google.com/groups?hl=e...40cpmsftngxa06

http://groups.google.com/groups?hl=e...erver.ntli.net
(conplete thread)

2. The LinkLabel can display multiple lines of text, and mix linked texted
with "regular" text. That way you can display one or more paragraphs of
text, with links embedded where appropriate. Of course, you won't be able
to format individual words or characters.

http://msdn.microsoft.com/msdnmag/is...l/default.aspx

The LinkLabel itself doesn't support scrollbars, but you can probably mimic
this functionality by plaing the LinkLabel into a panel with scrollbars and
then setting the LinkLabel's AutoSize property to True.

3. There might be a way to convert rich text into HTML. If so, you could
drop an ActiveX Web Browser control on your form and display the converted
rich text.

Hope this helps,
Robert Jacobson
"gabe" <gabe at rebelbase dot com> wrote in message
news:OA**************@TK2MSFTNGP10.phx.gbl...
I am looking for a way to mimic some of the functionality of a web page
without writing html (or I am looking to someone to point out something
really obvious that I am over looking)

Currently I read out some data into a dataset then appending it to a
richtextbox. So far so good. Some of the fields that I append are paths to documents. I would like to be able to click on the paths (like a hyperlink) I am able to create a linklabel at runtime and set its event handler I am
unable to place it where I would like. I was hoping to richtextbox.append
for the control but I cant seem to find a way to do this.

any help would really be appreciated

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by tota | last post: by
2 posts views Thread by Clark Stevens | last post: by
3 posts views Thread by vince | last post: by
1 post views Thread by Marcus Kwok | last post: by
4 posts views Thread by David Veeneman | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.