Change Color Of Different Lines On A Rich Text Box?

Mar 21, 2012

I'm creating a program that pings a host. I'm trying make text appear RED on one line if it's down, and GREEN if it's UP.

View 6 Replies


ADVERTISEMENT

Change Color Of Text In A Rich Textbox?

Jul 24, 2010

[code...

When I use this code I get the error "Property 'Chars' is 'ReadOnly'."

View 9 Replies

One Sub Procedure / Change Text Color In Rich Text Box / Without Button Handler?

Oct 8, 2010

everyone! I've been at this for a while, and I'm not sure how this issue can be resolved:I'm working on a project in VB.Net, and I have a form with a rich text box. I have a groupbox with 4 radio buttons inside that are intended to change the font color of the text. Coincidentally, I have to repeat this same functionality for a 2nd set of radio buttons that would change the text font family.

At any rate what I've only been able to do is the following to successfully change the font color of whatever text I highlight in the rich text box:

Private Sub rbtnBlack_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtnBlack.CheckedChanged
rtbxTextEditor.SelectionColor = Color.Black
End Sub
Private Sub rbtnRed_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtnRed.CheckedChanged

[Code]...

Is there a way that I could write a sub (I'm assuming I would use a sub, since I don't think I need to return anything, thus eliminating the use of a function) that would handle the action of changing the selected text color in the rich text box without having to use a separate sub for each radio button? Mind you, per my teacher's specs, she doesn't use a button handler for any of this.

View 1 Replies

Change Text's Color In Rich Text Box?

Oct 20, 2010

How can I change certain text's color (like Visual Studio does with "Public Class" or "Public Sub") is inside of a Rich Text Box?

View 14 Replies

Change Color In Rich Textbox?

Sep 30, 2010

I am trying to change color of a selectedtext in Rich TextBox.When user check color radio button it should change the color of the selected text.I have 4 radio buttons inside groupbox.Can someone tell me how do i select text and change color.Below is my code but its not working as expected.[code]....

View 6 Replies

Add Individual Lines To A Rich Text Box?

Aug 22, 2009

I am looking to add individual lines of user inputed text into a rich text box. I've been working with .text and .appendtext however I can't assign individual lines of text.[code]...

View 4 Replies

Get Only Displayed Lines In Rich Text Box

Jan 16, 2011

the question says it all, doesn't it? I was just wondering if it was possible to get only the displayed lines of text in a textbox. (Such as line indexes 1-15, to give an example.)

View 10 Replies

Replace All New Lines In A Rich Text Box To </br>?

Feb 10, 2011

how do i replace all new lines in a rich text box to </br> ?

View 1 Replies

Rich Text Box (Or Regular) Different Colored Lines?

Jun 5, 2011

I've out an output rich text box called TbxOutput, and I have many different tbxoutput.appendtext("") methods in my program.I don't really know much about how to set rich text box colors, and what I specifically need is for a simple line of code that i can plug in before the tbxoutput.appendtext("" + vbnewline) methods to make that particular line output text of a different color.

For example, when my program normally outputs messages it does it in black, and i want it to remain that way by default. But when it outputs an error message, I want that particular message

View 2 Replies

Show Number Of Lines In Rich Text Box?

Aug 31, 2010

I have 2 panels set up, one contains the rich text box the other one contains a single label. The am currently using the following code however it is not working.

Dim line_count As Integer = mainEditor.Lines.Length
Dim linecounter As Integer = line_count
linecounter += 1
line_count = 0

[code]....

View 6 Replies

Cannot Save Text In Rich Textbox If On Multiple Lines?

Apr 15, 2011

here is the code i am using to read from a rich textbox:


Dim mydir = my.computer.filesystem.currentdirectory
IO.Path.GetFileName(mydir + "
ecord" + tb_name.Text + ".txt" )
Dim linebuffer() As String = IO.file.ReadAllLines(mydir + "
ecord" + tb_name.Text + ".txt")
casefiles.rb_casefile.Text = linebuffer(0).Trim(""""c)

View 14 Replies

Make First 60 Characters In A Rich Text Box A Different Color Than The Remaining Text?

Feb 7, 2009

is it possible to make first 60 characters in a rich text box a different color than the remaining text?

View 25 Replies

Rich Text Box Font Color?

Apr 9, 2009

I have a program that checks for the color under the mouse pointer. I also stores what I think is the RGB (could someone confirm this?) value for that color in a Rich text box and next to that in a text box the coordinates of the mouse at that time.The idea is to be able to measure the times between the bounces of a tennis ball in a video. The background is black and the tennis ball is another color.I wasnt sure how to say "if color is not similar to black... Do this"So my plan was to set the richtextbox font color to itself - as it is an RGB value. But thats difficult, it wants to change ALL the text in the RichTextBox, not just the current Value.Basically Ideally I would like it if it recorded the times between significant changes in color of the pixel and displayed them.

View 1 Replies

Rich Text Box Fore Color?

Aug 28, 2010

How to set fore colors in text addition in Rich Text Boxes?

View 5 Replies

Tabbed Rich Text Box Text Color?

Apr 9, 2011

So I've tried a few different things I though may work, and none of them do. I can't figure out how to change the color of the text within the selected rich text box inside a tab control.

View 1 Replies

Text Color In Rich Text Box?

Nov 5, 2009

I can find a million examples of doing reg ex to apply syntax highlighting to a rich text box. but what i need it just a simple way to add in a word of a diffrent color.

What would the code be to just put the words "Hello World" into a textbox and have Hello be red and World be green?This code doesnt work.

this.richTextBox1.SelectionColor = Color.Red this.richTextBox1.text += "Test"

View 3 Replies

Change Item Text Color Or Background Color In ListBox In .NET 1.1

Jun 17, 2009

I am using .NET 1.1, so I don't have the access to listitem object. I would like to change the text color or the background color of certain items in a listbox. can it do it in .NET 1.1?

View 5 Replies

Rich Text Box To Automatically Change

Dec 23, 2011

i just started learning visual basic and i need some information i am using rich test box to input some text say like"RED BLUE GREEN" i want the Rich text box to automatically change

[Code]...

View 5 Replies

Color Item Text In GridView For Non-selected Lines Only?

Oct 8, 2009

I have a GridView with image buttons for selecting rows. I am using an OnRowDataBound event to color selected rows Blue:

e.Row.ForeColor = System.Drawing.Color.Blue

Now that works great as long as I don't set a color either in the CSS stylesheet or on the grid Items themselves. If I do that, then all rows are colored that color and I don't get my Blue selected rows color for selected rows. I would like to color the text in the grid something other than black.

View 1 Replies

Sort Text File Lines According Column Color?

Oct 14, 2009

I have line like this in text file[code]...

But the above code replace the line with 1,2,3,4 or 5. According to select case statement. How to modify the above code so that it sort the lines?

View 2 Replies

VS 2008 - Rich Text Box - Cannot Change Only Text

Aug 5, 2009

I have a rich text box and a fontDialog control. I am using it for the obvious purpose of changing the font of the text in the rtb, which I can do. What I would like to know is how, if there is no text selected inside the rtb, to make it only change the text that is typed after the change. I have already made it so that a selection can be changed independently but cannot make it change only text that is going to be typed if there is nothing selected.

View 1 Replies

Unable To Load Rich Text Files Into Rich Text Box?

Jan 12, 2009

I am unable to load rich text files into my rich text box. It worked fine yesterday, would there have been anything I could have changed by accident?

With OpenFileDialog
.Filter = "Text format (*.txt)|*.txt|Rich Text Format (*.rtf)|*.rtf|All files (*.*)|*.*"

[Code]...

but I am getting the error File format is not valid when i attempt to open any Rich Text file

View 4 Replies

Change Control's Text Color Depending On Control's Background Color

Sep 21, 2011

I have a TextBox that displays a color as its background color and the background color code in its text. I have set the text color as Black.The problem is that if the user sets the color as Black then the color code will be unreadable. How do I set the text color programmatically so that it becomes readable when the user selects any color?

View 1 Replies

Change Color Of Text?

May 26, 2008

I am new to visual basic and i'm having difficulty changing color of a text. I'm currently using visual studio 2008. My program is similar to a search engine in which you type a term inside the searchbox and the program will produce the results in a separate message box that will pop up. I would like for the search results in the message box to be changed to a different color.

View 6 Replies

How To Change Color Of Text

Aug 17, 2009

How can i change the color of the text in vb.net 2008 console?

View 3 Replies

How To Change Text Color

Dec 8, 2010

I am inserting COMMENTS and COMMAND from text box to rich text box,I want to change color of Comments to green and Commands to red and write it in rich text box.. But I am not able to convert the text color.

View 5 Replies

VS 2008 Change Specific Lines Of Text In A Listview At Certain Times Of The Day?

Feb 7, 2010

Im trying to change specific lines of text in a listview at certain times of the day. Heres what im using atm , but im not sure how to change the text in the listview.

If Now.Month = 2 And Now.Day > 6 Then
ListView1.Items(0) = ("My text here !!")
End If

View 9 Replies

Change Color Of Text According To Answer?

Oct 10, 2010

This might be a basic question but I am just starting in VB. How can you change the color of the text of a form if a person selects they are a boy or girl. I want the text to be blue if they select boy and pink if they select girl.

View 2 Replies

Change Color Of Text In Code Behind?

Feb 11, 2012

I am newbie using asp.net I want to ask on how to change color of the label with some conditional statement. For e.g if the stock is below 20 then the label will became red if not then it's black.

View 1 Replies

Change Color Of The Text In RichTextBox

Apr 10, 2009

Trying to change the color of more than one of the same text within a RichTextBox. [Code] The above code searches for, and changes the color of all "Boat"s found in the RichTextBox. There are a few problems, such as: If you were to go back to edit the RichTextBox and place your cursor in front of the, now blue word, "Boat" and type then all of your text would be blue. Also, the text you wish to change the color of in the RichTextBox MUST be Exactly the same as: "Search1", aka "Boat", capital letters and all.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved