.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 20th, 2012, 07:00 AM
aaronbromley aaronbromley is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 66 aaronbromley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 45 m 2 sec
Reputation Power: 9
VB.Net rich text box font colors

Hey people,

I have a program receiving strings of data through the serial port.
I am needing to display these on a screen (within a text box) but some of the strings need to be different colours.

Is there an easy way to do this?

The trouble I am having is that each time I make the new string a different colour everything changes.... so... I have written a function to store the strings and then read through each and determine the colours, but.... this can be very slow, as each time a new string is received the program needs to re-do all the colours of the old ones (otherwise their colour would be incorrect).

Can anyone help?

Reply With Quote
  #2  
Old November 26th, 2012, 02:03 PM
argee argee is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 9 argee User rank is Corporal (100 - 500 Reputation Level)argee User rank is Corporal (100 - 500 Reputation Level)argee User rank is Corporal (100 - 500 Reputation Level)argee User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 h 50 m 33 sec
Reputation Power: 0
Hi aaronbromley,

I replied to your other post in the VB section, so I'l re-post here :


How are you applying the color to the text?

I had a project a while back that involved formatting text in a rich text box and I remember that I had to select the section of text that I wanted to format first and then apply formatting to it similar to:

rtbViewOutput.SelectionStart = <some start point>
rtbViewOutput.SelectionLength = <some length of selection>
rtbViewOutput.SelectionColor = Color.Red

I know I had different formatting on different sections of text and I didn't have to re-assign previous formatting.

Hope that helps!

argee

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > VB.Net rich text box font colors

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap