473,394 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 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 5298
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hendrik | last post by:
Hi I have searched extensively for help on inserting text at the position of the mouse pointer in a text box as the final step of drag and drop process What I have come with is listed below - the...
0
by: tota | last post by:
i'm using windowsApplication to connect to DB made by SQL i need to Display the Data of the first table in the DB as links when click it it openes a table and i navigte between them using buttons...
2
by: Clark Stevens | last post by:
Hi. This should be so easy, but I don't get it. Let say I have RichTextbox1 and I want to insert some text at the current insertion point, or at the beginning of selected text (if there is any). ...
3
by: vince | last post by:
Hello, I have a ListBox filled with many lines of simply text I want to make few lines be a LinkLabel How can I do this Thanks
1
by: Marcus Kwok | last post by:
I am having problems getting my LinkLabel hyperlink to work properly. Every time I click on it, I get the following exception: System.ComponentModel.Win32Exception: The requested lookup key was...
4
by: David Veeneman | last post by:
I'm creating a UserControl that uses a LinkLabel. For reasons that I won't bore everyone with, I don't want the LinkLable to show the default hand cursor when the mouse enters the control. Should...
0
by: ajithmanmadhan | last post by:
hi pls help me out in inserting text into a richtextbox. the situation is like this:: i want to insert a string say "hello" at a particular location in the rich textbox. The particular...
3
by: bsturg21 | last post by:
Hello, I have a windows form that has a series of linklabels on it, and I need to have each linklabel, when clicked, open a separate windows form that has a single paramter passed into it. The...
2
by: prokopis | last post by:
am using c# for windows applications. am using dynamic linklayer array to print some labels in the form.i get some data from the database i add them in the linklabel array and i print it on the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.