By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,758 Members | 1,225 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,758 IT Pros & Developers. It's quick & easy.

inserting a linklabel progammably into a richtextbox

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.