Click here to Skip to main content
16,008,010 members
Home / Discussions / C#
   

C#

 
Questionhow to add columns to datagrid form its property Pin
sikandarhayat28-Aug-06 20:24
sikandarhayat28-Aug-06 20:24 
AnswerRe: how to add columns to datagrid form its property [modified] Pin
Siva Myneni28-Aug-06 21:24
Siva Myneni28-Aug-06 21:24 
GeneralRe: how to add columns to datagrid form its property Pin
sikandarhayat28-Aug-06 22:52
sikandarhayat28-Aug-06 22:52 
GeneralRe: how to add columns to datagrid form its property Pin
Siva Myneni30-Aug-06 21:28
Siva Myneni30-Aug-06 21:28 
QuestionRichtextBox Link Text Pin
AB777128-Aug-06 19:48
AB777128-Aug-06 19:48 
AnswerRe: RichtextBox Link Text Pin
Nader Elshehabi28-Aug-06 20:15
Nader Elshehabi28-Aug-06 20:15 
GeneralRe: RichtextBox Link Text Pin
AB777128-Aug-06 20:23
AB777128-Aug-06 20:23 
AnswerRe: RichtextBox Link Text Pin
Nader Elshehabi28-Aug-06 20:42
Nader Elshehabi28-Aug-06 20:42 
Hello


Yadav Pramod wrote:
it gives and error.

What is the error message?


Yadav Pramod wrote:
how do i do that?

It's possible, but I don't think it's worth it!! It will take some effort.

1- Make a LinkLabel object and initialize it.
2- Add it to MyRichTextBox object.
3- Set it's location according to your text -don't worry about scrolling-.
4- Handle the LinkLabel's own click event rather than the RichTextBox's event.

Sample code:

LinkLabel MyLink;
private void Form1_Load(object sender, EventArgs e)
{
    MyLink = new LinkLabel();
    MyLink.Text = "This is a link";
    MyLink.Links.Add(0, MyLink.Text.Length, @"file:///C:\Documents%20and%20Settings");
    MyLink.Click += new EventHandler(MyLink_Click);
    MyRichTextBox.Controls.Add(MyLink);
}

void MyLink_Click(object sender, EventArgs e)
{
    Process.Start(MyLink.Links[0].LinkData.ToString());
}


I hope this helps!!

RegardsRose | [Rose]

GeneralRe: RichtextBox Link Text Pin
AB777128-Aug-06 20:51
AB777128-Aug-06 20:51 
JokeRe: RichtextBox Link Text Pin
Nader Elshehabi28-Aug-06 21:23
Nader Elshehabi28-Aug-06 21:23 
AnswerRe: RichtextBox Link Text Pin
mav.northwind28-Aug-06 20:52
mav.northwind28-Aug-06 20:52 
QuestionHow work with images in C# [modified] Pin
signimage28-Aug-06 19:47
signimage28-Aug-06 19:47 
QuestionRe: How work with images in C# Pin
Nader Elshehabi28-Aug-06 20:59
Nader Elshehabi28-Aug-06 20:59 
QuestionRe: How work with images in C# Pin
signimage30-Aug-06 21:32
signimage30-Aug-06 21:32 
AnswerRe: How work with images in C# Pin
Nader Elshehabi31-Aug-06 1:50
Nader Elshehabi31-Aug-06 1:50 
QuestionOpenning a web site using Default Internet Explorer Pin
emran83428-Aug-06 18:38
emran83428-Aug-06 18:38 
AnswerRe: Openning a web site using Default Internet Explorer Pin
Steve Maier28-Aug-06 18:42
professionalSteve Maier28-Aug-06 18:42 
AnswerRe: Openning a web site using Default Internet Explorer Pin
Nader Elshehabi28-Aug-06 20:01
Nader Elshehabi28-Aug-06 20:01 
GeneralRe: Openning a web site using Default Internet Explorer Pin
emran83429-Aug-06 2:02
emran83429-Aug-06 2:02 
QuestionUsing EM_GETRECT and EM_SETRECT for RTF boxes in C#? Pin
handa2928-Aug-06 17:36
handa2928-Aug-06 17:36 
AnswerRe: Using EM_GETRECT and EM_SETRECT for RTF boxes in C#? Pin
handa2928-Aug-06 17:47
handa2928-Aug-06 17:47 
AnswerRe: Using EM_GETRECT and EM_SETRECT for RTF boxes in C#? Pin
mav.northwind29-Aug-06 4:18
mav.northwind29-Aug-06 4:18 
QuestionC# 2.0 BackgroundWorker Pin
kselman28-Aug-06 16:47
kselman28-Aug-06 16:47 
AnswerRe: C# 2.0 BackgroundWorker Pin
Not Active28-Aug-06 17:11
mentorNot Active28-Aug-06 17:11 
AnswerRe: C# 2.0 BackgroundWorker Pin
Bob Nadler28-Aug-06 17:26
Bob Nadler28-Aug-06 17:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.