colors C#

Please support our C# advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Nov 2007
Posts: 51
Reputation: Jacky1 is an unknown quantity at this point 
Solved Threads: 2
Jacky1 Jacky1 is offline Offline
Junior Poster in Training

colors C#

 
0
  #1
Dec 30th, 2008
OK i have an array of 10 elements and I want to color the 5th element with a different color than the default color , is that possible ?


Thanks
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,995
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 294
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: colors C#

 
0
  #2
Dec 30th, 2008
An element?
Which element, chemical?
Be more specificic with your question please.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 51
Reputation: Jacky1 is an unknown quantity at this point 
Solved Threads: 2
Jacky1 Jacky1 is offline Offline
Junior Poster in Training

Re: colors C#

 
0
  #3
Dec 30th, 2008
an index of an array
EX: if i the array size 10 thats mean we have 10 indexes so I want to color the index number 5 only and the rest 9 indexes will remain uncolored

Thanks
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,995
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 294
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: colors C#

 
0
  #4
Dec 30th, 2008
An array is a variable in memory you can not color that.
But I guess you want to color text you see on a screen?
Lets say 10 numbers from an array and you want to color number 5?
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 51
Reputation: Jacky1 is an unknown quantity at this point 
Solved Threads: 2
Jacky1 Jacky1 is offline Offline
Junior Poster in Training

Re: colors C#

 
0
  #5
Dec 30th, 2008
Originally Posted by ddanbe View Post
An array is a variable in memory you can not color that.
But I guess you want to color text you see on a screen?
Lets say 10 numbers from an array and you want to color number 5?
yes when I output the array to the textbox I want number 5 to be colored
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,995
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 294
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: colors C#

 
0
  #6
Dec 30th, 2008
Why didn't you asked that question in the first place?
I'm affraid it can't be done in a normal textbox.
But it can certainly be done in a RichTextBox.
I have not tried it but this should work:
MyRichTextBox.Select(6,1);//select char 6 from my text
MyRichTextBox.SelectionColor=Color.Red;//color this red

Open your help menu and choose search, type RichTextBox for more information
Last edited by ddanbe; Dec 30th, 2008 at 7:34 pm.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 51
Reputation: Jacky1 is an unknown quantity at this point 
Solved Threads: 2
Jacky1 Jacky1 is offline Offline
Junior Poster in Training

Re: colors C#

 
0
  #7
Jan 11th, 2009
Thank you
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC