Am using RichTextBox in a C#/Winforms application.
Am showing some text in this control which has got some UNC file paths embedded into it: for example: filePath= "\\serverName\DirName\File"
Richtextbox shows this file path as a clickable hyperlink in the UI. filePath= "\\serverName\DirName\File.doc"
I want to show it as plain text instead.How do i achieve this?
Thanks.
There's a property you can change named DetectUrls. It is set to true
by default, set it to false
to get rid of the clicking behaviour e.g.
richTextBoxName.DetectUrls = false;
Or you can simply set it to false using the properties editor in Visual Studio.
http://msdn.microsoft.com/en-us/library/system.windows.forms.richtextbox.detecturls.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With