I am appending the string failing_client to a RichTextBox control named report_output_box in a WinForms app using C#.
Is there a to make that string clickable inside the RichTextBox control, then pass a string to the onclick method?
What are my options here?
Update: I need to be more specific. I do not want to open a URL on the OnClick action, but instead, call a function.
Sample Code:
//... code before this
//failing_client_list is list of servers
foreach (string failing_client in failing_client_list)
{
//link onclick will call a method w/ a string argument
report_output_box.LinkClicked += new
LinkClickedEventHandler(open_inet_window(failing_client));
report_output_box.AppendText(failing_client + "\n");
}
//code after...
//method it would call
private void open_inet_window(object sender, EventArgs e, string failing_client)
{
//create a window object (w/ window consturctor) and then open it
inet_clients_window inizzy_window = new inet_clients_window(failing_client);
inizzy_window.Show();
}
Thanks!