PC Review


Reply
Thread Tools Rate Thread

Change the color of text at a specific location on each text line

 
 
=?Utf-8?B?QnJpYW4gQ29vaw==?=
Guest
Posts: n/a
 
      7th Aug 2007
I want to change the font color and weight at a specific position in the text.

I am not sure where or what I need to do. It will be at position 155/156
from the left on each line.

Here is the code I need to put it into.

using System;
using System.Drawing;
using System.IO;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace DatReader
{
class Streamer
{
public static string LayoutInput(string input)
{
StreamReader sr = File.OpenText(input);
StringBuilder sb = new StringBuilder(input.Length);
bool firstLine = true;
string line;
while ((line = sr.ReadLine()) != null)
{
if (line.Length < 29) { throw new
InvalidOperationException("invalid input"); }
if (line[29] != ' ')
{
int txPos;
int rxPos = -1;
if (firstLine)
firstLine = false;
else
sb.Append("\r\n");
if (((txPos = line.IndexOf("TX")) > -1) || ((rxPos =
line.IndexOf("RX")) > 0))
{
int charactersTillPoint;
if (txPos > -1)
charactersTillPoint = txPos;
else
charactersTillPoint = rxPos;
string part0 = line.Substring(0, charactersTillPoint);
string part1 = line.Substring(charactersTillPoint);
sb.Append(part0.PadRight(86));
sb.Append(part1);
}
else
sb.Append(line);
}
else
{
sb.Append(line.Substring(30));
}
}
return sb.ToString();
}
}
}

Thanks,


 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      7th Aug 2007
Brian,

What are you displaying this in? All you have shown is some content,
but not the mechanism by which you want to display it.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Brian Cook" <(E-Mail Removed)> wrote in message
news:1B05FEA5-6B72-4D11-BCE2-(E-Mail Removed)...
>I want to change the font color and weight at a specific position in the
>text.
>
> I am not sure where or what I need to do. It will be at position 155/156
> from the left on each line.
>
> Here is the code I need to put it into.
>
> using System;
> using System.Drawing;
> using System.IO;
> using System.Collections.Generic;
> using System.Text;
> using System.Windows.Forms;
>
> namespace DatReader
> {
> class Streamer
> {
> public static string LayoutInput(string input)
> {
> StreamReader sr = File.OpenText(input);
> StringBuilder sb = new StringBuilder(input.Length);
> bool firstLine = true;
> string line;
> while ((line = sr.ReadLine()) != null)
> {
> if (line.Length < 29) { throw new
> InvalidOperationException("invalid input"); }
> if (line[29] != ' ')
> {
> int txPos;
> int rxPos = -1;
> if (firstLine)
> firstLine = false;
> else
> sb.Append("\r\n");
> if (((txPos = line.IndexOf("TX")) > -1) || ((rxPos =
> line.IndexOf("RX")) > 0))
> {
> int charactersTillPoint;
> if (txPos > -1)
> charactersTillPoint = txPos;
> else
> charactersTillPoint = rxPos;
> string part0 = line.Substring(0,
> charactersTillPoint);
> string part1 = line.Substring(charactersTillPoint);
> sb.Append(part0.PadRight(86));
> sb.Append(part1);
> }
> else
> sb.Append(line);
> }
> else
> {
> sb.Append(line.Substring(30));
> }
> }
> return sb.ToString();
> }
> }
> }
>
> Thanks,
>
>


 
Reply With Quote
 
=?Utf-8?B?QnJpYW4gQ29vaw==?=
Guest
Posts: n/a
 
      7th Aug 2007
I have a text file that I modify from a compressed hex format into a single
line. This is the output of that part of the program that displays in a
RichTextBox;

2007/07/27 11:59:37 [123007]ARES_EINDICATION 010.050.016.004 407.3.01
(65e1) RX 68 bytes 65 E1 26 02 A4 5C AA 20 76 79 51 23 50 76 37 62
99 00 48 02 02 C7 88 01 C7 88 AA 50 76 37 62 99 20 76 79 51 23 D7 07 07 1B 0B
3B 22 00 00 10 06 0A 06 06 06 06 06 06 06 0A 0A 06 06 06 0A 0A BB 1C 78 56 BC

In this sample the hex pair 48 represents the position in the line. It lays
out at position 155/156 from the left. I need to change this to BLUE/BOLD for
every instance of the ARES_INIDICATION and ARES_EINDICATION as the form loads.


Hope that clears it up.

Thanks,


"Nicholas Paldino [.NET/C# MVP]" wrote:

> Brian,
>
> What are you displaying this in? All you have shown is some content,
> but not the mechanism by which you want to display it.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Brian Cook" <(E-Mail Removed)> wrote in message
> news:1B05FEA5-6B72-4D11-BCE2-(E-Mail Removed)...
> >I want to change the font color and weight at a specific position in the
> >text.
> >
> > I am not sure where or what I need to do. It will be at position 155/156
> > from the left on each line.
> >
> > Here is the code I need to put it into.
> >
> > using System;
> > using System.Drawing;
> > using System.IO;
> > using System.Collections.Generic;
> > using System.Text;
> > using System.Windows.Forms;
> >
> > namespace DatReader
> > {
> > class Streamer
> > {
> > public static string LayoutInput(string input)
> > {
> > StreamReader sr = File.OpenText(input);
> > StringBuilder sb = new StringBuilder(input.Length);
> > bool firstLine = true;
> > string line;
> > while ((line = sr.ReadLine()) != null)
> > {
> > if (line.Length < 29) { throw new
> > InvalidOperationException("invalid input"); }
> > if (line[29] != ' ')
> > {
> > int txPos;
> > int rxPos = -1;
> > if (firstLine)
> > firstLine = false;
> > else
> > sb.Append("\r\n");
> > if (((txPos = line.IndexOf("TX")) > -1) || ((rxPos =
> > line.IndexOf("RX")) > 0))
> > {
> > int charactersTillPoint;
> > if (txPos > -1)
> > charactersTillPoint = txPos;
> > else
> > charactersTillPoint = rxPos;
> > string part0 = line.Substring(0,
> > charactersTillPoint);
> > string part1 = line.Substring(charactersTillPoint);
> > sb.Append(part0.PadRight(86));
> > sb.Append(part1);
> > }
> > else
> > sb.Append(line);
> > }
> > else
> > {
> > sb.Append(line.Substring(30));
> > }
> > }
> > return sb.ToString();
> > }
> > }
> > }
> >
> > Thanks,
> >
> >

>
>

 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      7th Aug 2007
Brian,

What you will want to do in this case is for the sections that you want
to change the font/color of, you would select them using the
SelectedText/SelectedRtf properties, or the SelectionLength/SelectionStart
properties. Once you have the text selected that you want to format, you
can set the SelectionColor and SelectionFont properties to change the
font/color of the selected text.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"Brian Cook" <(E-Mail Removed)> wrote in message
news:19F4AF9F-A600-4864-9BDA-(E-Mail Removed)...
>I have a text file that I modify from a compressed hex format into a single
> line. This is the output of that part of the program that displays in a
> RichTextBox;
>
> 2007/07/27 11:59:37 [123007]ARES_EINDICATION 010.050.016.004 407.3.01
> (65e1) RX 68 bytes 65 E1 26 02 A4 5C AA 20 76 79 51 23 50 76 37
> 62
> 99 00 48 02 02 C7 88 01 C7 88 AA 50 76 37 62 99 20 76 79 51 23 D7 07 07 1B
> 0B
> 3B 22 00 00 10 06 0A 06 06 06 06 06 06 06 0A 0A 06 06 06 0A 0A BB 1C 78 56
> BC
>
> In this sample the hex pair 48 represents the position in the line. It
> lays
> out at position 155/156 from the left. I need to change this to BLUE/BOLD
> for
> every instance of the ARES_INIDICATION and ARES_EINDICATION as the form
> loads.
>
>
> Hope that clears it up.
>
> Thanks,
>
>
> "Nicholas Paldino [.NET/C# MVP]" wrote:
>
>> Brian,
>>
>> What are you displaying this in? All you have shown is some content,
>> but not the mechanism by which you want to display it.
>>
>>
>> --
>> - Nicholas Paldino [.NET/C# MVP]
>> - (E-Mail Removed)
>>
>> "Brian Cook" <(E-Mail Removed)> wrote in message
>> news:1B05FEA5-6B72-4D11-BCE2-(E-Mail Removed)...
>> >I want to change the font color and weight at a specific position in the
>> >text.
>> >
>> > I am not sure where or what I need to do. It will be at position
>> > 155/156
>> > from the left on each line.
>> >
>> > Here is the code I need to put it into.
>> >
>> > using System;
>> > using System.Drawing;
>> > using System.IO;
>> > using System.Collections.Generic;
>> > using System.Text;
>> > using System.Windows.Forms;
>> >
>> > namespace DatReader
>> > {
>> > class Streamer
>> > {
>> > public static string LayoutInput(string input)
>> > {
>> > StreamReader sr = File.OpenText(input);
>> > StringBuilder sb = new StringBuilder(input.Length);
>> > bool firstLine = true;
>> > string line;
>> > while ((line = sr.ReadLine()) != null)
>> > {
>> > if (line.Length < 29) { throw new
>> > InvalidOperationException("invalid input"); }
>> > if (line[29] != ' ')
>> > {
>> > int txPos;
>> > int rxPos = -1;
>> > if (firstLine)
>> > firstLine = false;
>> > else
>> > sb.Append("\r\n");
>> > if (((txPos = line.IndexOf("TX")) > -1) || ((rxPos =
>> > line.IndexOf("RX")) > 0))
>> > {
>> > int charactersTillPoint;
>> > if (txPos > -1)
>> > charactersTillPoint = txPos;
>> > else
>> > charactersTillPoint = rxPos;
>> > string part0 = line.Substring(0,
>> > charactersTillPoint);
>> > string part1 =
>> > line.Substring(charactersTillPoint);
>> > sb.Append(part0.PadRight(86));
>> > sb.Append(part1);
>> > }
>> > else
>> > sb.Append(line);
>> > }
>> > else
>> > {
>> > sb.Append(line.Substring(30));
>> > }
>> > }
>> > return sb.ToString();
>> > }
>> > }
>> > }
>> >
>> > Thanks,
>> >
>> >

>>
>>



 
Reply With Quote
 
=?Utf-8?B?QnJpYW4gQ29vaw==?=
Guest
Posts: n/a
 
      7th Aug 2007
Thanks Nicholas, I will give that a try and let you know.

Brian

"Nicholas Paldino [.NET/C# MVP]" wrote:

> Brian,
>
> What you will want to do in this case is for the sections that you want
> to change the font/color of, you would select them using the
> SelectedText/SelectedRtf properties, or the SelectionLength/SelectionStart
> properties. Once you have the text selected that you want to format, you
> can set the SelectionColor and SelectionFont properties to change the
> font/color of the selected text.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Brian Cook" <(E-Mail Removed)> wrote in message
> news:19F4AF9F-A600-4864-9BDA-(E-Mail Removed)...
> >I have a text file that I modify from a compressed hex format into a single
> > line. This is the output of that part of the program that displays in a
> > RichTextBox;
> >
> > 2007/07/27 11:59:37 [123007]ARES_EINDICATION 010.050.016.004 407.3.01
> > (65e1) RX 68 bytes 65 E1 26 02 A4 5C AA 20 76 79 51 23 50 76 37
> > 62
> > 99 00 48 02 02 C7 88 01 C7 88 AA 50 76 37 62 99 20 76 79 51 23 D7 07 07 1B
> > 0B
> > 3B 22 00 00 10 06 0A 06 06 06 06 06 06 06 0A 0A 06 06 06 0A 0A BB 1C 78 56
> > BC
> >
> > In this sample the hex pair 48 represents the position in the line. It
> > lays
> > out at position 155/156 from the left. I need to change this to BLUE/BOLD
> > for
> > every instance of the ARES_INIDICATION and ARES_EINDICATION as the form
> > loads.
> >
> >
> > Hope that clears it up.
> >
> > Thanks,
> >
> >
> > "Nicholas Paldino [.NET/C# MVP]" wrote:
> >
> >> Brian,
> >>
> >> What are you displaying this in? All you have shown is some content,
> >> but not the mechanism by which you want to display it.
> >>
> >>
> >> --
> >> - Nicholas Paldino [.NET/C# MVP]
> >> - (E-Mail Removed)
> >>
> >> "Brian Cook" <(E-Mail Removed)> wrote in message
> >> news:1B05FEA5-6B72-4D11-BCE2-(E-Mail Removed)...
> >> >I want to change the font color and weight at a specific position in the
> >> >text.
> >> >
> >> > I am not sure where or what I need to do. It will be at position
> >> > 155/156
> >> > from the left on each line.
> >> >
> >> > Here is the code I need to put it into.
> >> >
> >> > using System;
> >> > using System.Drawing;
> >> > using System.IO;
> >> > using System.Collections.Generic;
> >> > using System.Text;
> >> > using System.Windows.Forms;
> >> >
> >> > namespace DatReader
> >> > {
> >> > class Streamer
> >> > {
> >> > public static string LayoutInput(string input)
> >> > {
> >> > StreamReader sr = File.OpenText(input);
> >> > StringBuilder sb = new StringBuilder(input.Length);
> >> > bool firstLine = true;
> >> > string line;
> >> > while ((line = sr.ReadLine()) != null)
> >> > {
> >> > if (line.Length < 29) { throw new
> >> > InvalidOperationException("invalid input"); }
> >> > if (line[29] != ' ')
> >> > {
> >> > int txPos;
> >> > int rxPos = -1;
> >> > if (firstLine)
> >> > firstLine = false;
> >> > else
> >> > sb.Append("\r\n");
> >> > if (((txPos = line.IndexOf("TX")) > -1) || ((rxPos =
> >> > line.IndexOf("RX")) > 0))
> >> > {
> >> > int charactersTillPoint;
> >> > if (txPos > -1)
> >> > charactersTillPoint = txPos;
> >> > else
> >> > charactersTillPoint = rxPos;
> >> > string part0 = line.Substring(0,
> >> > charactersTillPoint);
> >> > string part1 =
> >> > line.Substring(charactersTillPoint);
> >> > sb.Append(part0.PadRight(86));
> >> > sb.Append(part1);
> >> > }
> >> > else
> >> > sb.Append(line);
> >> > }
> >> > else
> >> > {
> >> > sb.Append(line.Substring(30));
> >> > }
> >> > }
> >> > return sb.ToString();
> >> > }
> >> > }
> >> > }
> >> >
> >> > Thanks,
> >> >
> >> >
> >>
> >>

>
>
>

 
Reply With Quote
 
=?Utf-8?B?QnJpYW4gQ29vaw==?=
Guest
Posts: n/a
 
      8th Aug 2007
Nicholas, this is the routine I wrote, that DOES highlight the specific info
that I want highlighted.

The problem is it is time consuming(4mb file, 1-2 minutes) to load as it
populate the RichTextBox and highlights as it goes.

Is there a way I can have it do the same info before it popultes to the form?

Goal would be Open source log, read the log, and highlight the desired
information, then Show in the RichTextBox of the form.


---------------------------------------------------
private void findSequenceNumbers()
{
toolStripStatusLabel.Visible = toolStripProgressBar.Visible =
true;
toolStripProgressBar.Value = 0;
int lineNum = 0;
bool startingNewLine = true;
FontStyle style = FontStyle.Bold;
string[] lines = rtbTextBox.Lines;
string text = rtbTextBox.Text;
toolStripProgressBar.Maximum = text.Length;
for (int i = 0; i < text.Length; i++)
{
if (startingNewLine)
{
if ((lines[lineNum].Contains("ARES_EINDICATION")) ||
(lines[lineNum].Contains("ARES_INDICATION")))
{
i += 169;
rtbTextBox.Select(i, 2);
rtbTextBox.SelectionFont = new
Font(rtbTextBox.SelectionFont, rtbTextBox.SelectionFont.Style ^ style);
rtbTextBox.SelectionColor = Color.DarkBlue;
}
else if
(lines[lineNum].Contains("]CODELINE_INDICATION_MSG"))
{
i += 160;
rtbTextBox.Select(i, 2);
rtbTextBox.SelectionFont = new
Font(rtbTextBox.SelectionFont, rtbTextBox.SelectionFont.Style ^ style);
rtbTextBox.SelectionColor = Color.DarkBlue;
}
else
{
i += lines[lineNum].Length - 1;
}
startingNewLine = false;
Application.DoEvents();
}
if (text[i] == '\n')
{
startingNewLine = true;
lineNum++;
}
toolStripProgressBar.Value = i;
}
toolStripStatusLabel.Visible = toolStripProgressBar.Visible =
false;
}
-------------------------------------------------------------

Thanks,



"Nicholas Paldino [.NET/C# MVP]" wrote:

> Brian,
>
> What you will want to do in this case is for the sections that you want
> to change the font/color of, you would select them using the
> SelectedText/SelectedRtf properties, or the SelectionLength/SelectionStart
> properties. Once you have the text selected that you want to format, you
> can set the SelectionColor and SelectionFont properties to change the
> font/color of the selected text.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Brian Cook" <(E-Mail Removed)> wrote in message
> news:19F4AF9F-A600-4864-9BDA-(E-Mail Removed)...
> >I have a text file that I modify from a compressed hex format into a single
> > line. This is the output of that part of the program that displays in a
> > RichTextBox;
> >
> > 2007/07/27 11:59:37 [123007]ARES_EINDICATION 010.050.016.004 407.3.01
> > (65e1) RX 68 bytes 65 E1 26 02 A4 5C AA 20 76 79 51 23 50 76 37
> > 62
> > 99 00 48 02 02 C7 88 01 C7 88 AA 50 76 37 62 99 20 76 79 51 23 D7 07 07 1B
> > 0B
> > 3B 22 00 00 10 06 0A 06 06 06 06 06 06 06 0A 0A 06 06 06 0A 0A BB 1C 78 56
> > BC
> >
> > In this sample the hex pair 48 represents the position in the line. It
> > lays
> > out at position 155/156 from the left. I need to change this to BLUE/BOLD
> > for
> > every instance of the ARES_INIDICATION and ARES_EINDICATION as the form
> > loads.
> >
> >
> > Hope that clears it up.
> >
> > Thanks,
> >
> >
> > "Nicholas Paldino [.NET/C# MVP]" wrote:
> >
> >> Brian,
> >>
> >> What are you displaying this in? All you have shown is some content,
> >> but not the mechanism by which you want to display it.
> >>
> >>
> >> --
> >> - Nicholas Paldino [.NET/C# MVP]
> >> - (E-Mail Removed)
> >>
> >> "Brian Cook" <(E-Mail Removed)> wrote in message
> >> news:1B05FEA5-6B72-4D11-BCE2-(E-Mail Removed)...
> >> >I want to change the font color and weight at a specific position in the
> >> >text.
> >> >
> >> > I am not sure where or what I need to do. It will be at position
> >> > 155/156
> >> > from the left on each line.
> >> >
> >> > Here is the code I need to put it into.
> >> >
> >> > using System;
> >> > using System.Drawing;
> >> > using System.IO;
> >> > using System.Collections.Generic;
> >> > using System.Text;
> >> > using System.Windows.Forms;
> >> >
> >> > namespace DatReader
> >> > {
> >> > class Streamer
> >> > {
> >> > public static string LayoutInput(string input)
> >> > {
> >> > StreamReader sr = File.OpenText(input);
> >> > StringBuilder sb = new StringBuilder(input.Length);
> >> > bool firstLine = true;
> >> > string line;
> >> > while ((line = sr.ReadLine()) != null)
> >> > {
> >> > if (line.Length < 29) { throw new
> >> > InvalidOperationException("invalid input"); }
> >> > if (line[29] != ' ')
> >> > {
> >> > int txPos;
> >> > int rxPos = -1;
> >> > if (firstLine)
> >> > firstLine = false;
> >> > else
> >> > sb.Append("\r\n");
> >> > if (((txPos = line.IndexOf("TX")) > -1) || ((rxPos =
> >> > line.IndexOf("RX")) > 0))
> >> > {
> >> > int charactersTillPoint;
> >> > if (txPos > -1)
> >> > charactersTillPoint = txPos;
> >> > else
> >> > charactersTillPoint = rxPos;
> >> > string part0 = line.Substring(0,
> >> > charactersTillPoint);
> >> > string part1 =
> >> > line.Substring(charactersTillPoint);
> >> > sb.Append(part0.PadRight(86));
> >> > sb.Append(part1);
> >> > }
> >> > else
> >> > sb.Append(line);
> >> > }
> >> > else
> >> > {
> >> > sb.Append(line.Substring(30));
> >> > }
> >> > }
> >> > return sb.ToString();
> >> > }
> >> > }
> >> > }
> >> >
> >> > Thanks,
> >> >
> >> >
> >>
> >>

>
>
>

 
Reply With Quote
 
Roger Drost
Guest
Posts: n/a
 
      25th Sep 2007
I had the same requirement. i worked for days trying to come up with a solution. Finally i solved the problem by copying the RTB and pasting the copy right over the original making an exact duplicate on the form.

Then i alternated which RTB to use ... made it invisible, updated the data, then made it visible.

That made it lightning fast as it eliminated the annoying "screen scrolling" as each line was updated.

Then i made it visible ... problem solved.

HOWEVER .. there are some consequences of this approach ... for example, you have to keep track of which RTB the User clicked on ... etc etc etc.

I used one global variable to keep track of which RTB was most recently updated, RTBToUse.

the code looks like this:

***** prep:
// I am using 2 separate RTB controls so i can update out-of-sight
// to avoid the very agravating scrolling when "select" is used to update
// the colors of the reminder lines (on a massive scale)

if (RTBToUse == "RemRTB1") // swap them each time thru
{
RTBToUse = "RemRTB2";
RemRTB2.Visible = false; // Hide it while we update
RemRTB2.Clear(); // Clear it
}
else
{
RTBToUse = "RemRTB1";
RemRTB1.Visible = false; // Hide it while we update
RemRTB1.Clear();
}


*** then update your data ***

if (RTBToUse == "RemRTB1")
{
RemRTB1.SelectionColor = remColor[n];
RemRTB1.AppendText(aLine + System.Environment.NewLine);
}
else
{
RemRTB2.SelectionColor = remColor[n];
RemRTB2.AppendText(aLine + System.Environment.NewLine);
}

*** finish wih:

if (RTBToUse == "RemRTB1")
{
RemRTB1.Select(0, 0);
RemRTB1.Visible = true;
}
else
{
RemRTB2.Select(0, 0);
RemRTB2.Visible = true;
}


EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
Reply With Quote
 
=?Utf-8?B?QnJpYW4gQ29vaw==?=
Guest
Posts: n/a
 
      26th Sep 2007
Thanks Roger,

Brian

"Roger Drost" wrote:

> I had the same requirement. i worked for days trying to come up with a solution. Finally i solved the problem by copying the RTB and pasting the copy right over the original making an exact duplicate on the form.
>
> Then i alternated which RTB to use ... made it invisible, updated the data, then made it visible.
>
> That made it lightning fast as it eliminated the annoying "screen scrolling" as each line was updated.
>
> Then i made it visible ... problem solved.
>
> HOWEVER .. there are some consequences of this approach ... for example, you have to keep track of which RTB the User clicked on ... etc etc etc.
>
> I used one global variable to keep track of which RTB was most recently updated, RTBToUse.
>
> the code looks like this:
>
> ***** prep:
> // I am using 2 separate RTB controls so i can update out-of-sight
> // to avoid the very agravating scrolling when "select" is used to update
> // the colors of the reminder lines (on a massive scale)
>
> if (RTBToUse == "RemRTB1") // swap them each time thru
> {
> RTBToUse = "RemRTB2";
> RemRTB2.Visible = false; // Hide it while we update
> RemRTB2.Clear(); // Clear it
> }
> else
> {
> RTBToUse = "RemRTB1";
> RemRTB1.Visible = false; // Hide it while we update
> RemRTB1.Clear();
> }
>
>
> *** then update your data ***
>
> if (RTBToUse == "RemRTB1")
> {
> RemRTB1.SelectionColor = remColor[n];
> RemRTB1.AppendText(aLine + System.Environment.NewLine);
> }
> else
> {
> RemRTB2.SelectionColor = remColor[n];
> RemRTB2.AppendText(aLine + System.Environment.NewLine);
> }
>
> *** finish wih:
>
> if (RTBToUse == "RemRTB1")
> {
> RemRTB1.Select(0, 0);
> RemRTB1.Visible = true;
> }
> else
> {
> RemRTB2.Select(0, 0);
> RemRTB2.Visible = true;
> }
>
>
> EggHeadCafe - .NET Developer Portal of Choice
> http://www.eggheadcafe.com
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change Font color specific text jlr Microsoft Excel Misc 1 6th May 2010 08:19 PM
Change color of specific text piece Faraz A. Qureshi Microsoft Excel Programming 4 20th Jan 2010 06:39 AM
Change text color for specific percentage =?Utf-8?B?Q2hlcg==?= Microsoft Access 1 14th Jul 2006 07:45 PM
Change color of specific text within a cell? avarga82@gmail.com Microsoft Excel Programming 0 13th Jul 2006 04:58 PM
How can you change the color of the text in the subject line? =?Utf-8?B?am9obnAx?= Microsoft Outlook Discussion 2 10th Nov 2005 06:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:42 PM.