Highlight the TextColour in RichTextBox

Posted by Siri under C# on 3/29/2012 | Points: 10 | Views : 1426 | Status : [Member] | Replies : 10
How to Highlight the textColour in RichTextBox . Colour should be move to next word by word until till the end of paragraph.
It should be like below image.




Responses

Posted by: Self-Innovator on: 3/30/2012 [Member] Bronze | Points: 25

Up
0
Down
hi this is using javascript..
document.getElementById("txtBox1").style.color = 'maroon';


Join Hands Change lives
Thanks & Regards
Straight Edge Society

Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Siri on: 3/30/2012 [Member] Starter | Points: 25

Up
0
Down
Colour Should move to next word by word till the end of paragraph

Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Subhacomm on: 3/30/2012 [Member] Starter | Points: 25

Up
0
Down
try the following code...
<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<title></title>
<script language="javascript" type="text/javascript">
function coloredTheText(e) {
x = e;
document.getElementById('Text1').style.color='blue';
document.getElementById('Text1').value = x;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Text1" type="text" onkeypress="coloredTheText(this.value)" />
</div>
</form>
</body>
</html>


Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Siri on: 3/30/2012 [Member] Starter | Points: 25

Up
0
Down
Text back colour should move word by word using Csharp.net


Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 3/30/2012 [Member] Silver | Points: 25

Up
0
Down
Hi Siri,

Here the code for highlight the colour text in RichTextbox.
C#:

Rtxt_box.Select(Start_Position, Length);
Rtxt_box.SelectionColor = Color.White;
Rtxt_box.SelectionBackColor = Color.Blue;


Regards,
Singaravel M

Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Siri on: 4/4/2012 [Member] Starter | Points: 25

Up
0
Down
getting error near Start_Position, Length)

Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sakthi.Singaravel on: 4/4/2012 [Member] Silver | Points: 25

Up
0
Down
Hi Siri,
can u copy the code and error details..?


Regards,
Singaravel M

Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Siri on: 4/10/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Above code is not working. Colour should move word by word using TimerControl

Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 4/10/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

first Completely Define what you want and in which manner

Thanks

R D Patel

Siri, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Siri on: 4/10/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

Highlight Colour should move one word by word in richtextbox using c#.net only.


Siri, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response