Does RichTexBox.DetectUrls work for link to disk file?
Hello
In Framework 2.0
Code:
this.rtb = new RichTextBox();
rtb.DetectUrl = true;
rtb.AppendText("c:/text.txt");
as a result I can see "c:/text.txt" formates as a link to file test.txt
In Framework 1.1
as a result I can see "c:/test.txt" which is not formated as a link.
My question is:
1. Does DetectUrls work only for HTTP links ?
2. Is it possible to format "c:/.." string as a link to file without addidtional extra code ?
Thanks in advance
andrzej
Re: Does RichTexBox.DetectUrls work for link to disk file?
Yes, it will accept any of these protocols :
Code:
file:, mailto:, ftp:, http:, https:, telnet:, news:, wais:, outlook:, gopher:, nntp:, prospero:
To link to a file on disk, you have to supply file:, like this :
Code:
file:///C:/WhateverFolder/WhateverFile
I hope it helps.
Re: Does RichTexBox.DetectUrls work for lik to disk file?
Thank you very much for your concrete, perfect answer.