Change Current Line In Richtextbox?

Jun 15, 2009

is there a way to change the cursor position to the beginning of the another line in a richtextboxfor example, if i'm on the second line, i want code that will transport my cursor position to the beginning of the fourth line, etcfrustrated visual basic user

View 11 Replies


ADVERTISEMENT

Get And Set Current Line In A RichTextBox?

Jan 22, 2011

I know it seems like a simple enough question, but I can't figure out how to get and set the current line of text. Say line 4 is "Hello World", I want to be able to recieve that this says "Hello World" then switch it with something else if need be.

View 4 Replies

RichTextbox - Current Line Number Changed Event

Feb 7, 2010

How can I do some code when the user changes what line the caret is on? So something like:
sub textbox1_lineindexchanged (byval ....) Handles Textbox1.Lineindexchanged
'do code based on the current line
end sub
I am using a richtextbox, just I always used it so I just call it a textbox.

View 3 Replies

Get Current Line And Column Numbers In A RichTextBox In A Winforms Application?

Mar 11, 2010

How do I get the current line and column numbers in a RichTextBox in a Winforms application?

View 3 Replies

Change A Line In A Richtextbox?

Dec 28, 2008

How do i change a line in a richtextbox?[code]...

View 4 Replies

C# - Change Line Spacing In Winform RichTextBox?

Jun 23, 2010

I'm using in my winform project a RichTextBox control to display a kind of old console screen.This works perfectly but there is a space between the lines.Is it possible to change this space to be 0 or anything near that.If i paint a line from vetical line from line 1 to line 5 i don't want any spacing between the line.

View 2 Replies

Read Text From A Listbox Line By Line And Put Current Line In A Label?

Jan 16, 2011

how to read text from a listbox line by line and put current line in a label?

View 3 Replies

Word Wrapping - Cannot Select Last Line Of Richtextbox (when A Line Is Wrapped It Becomes Two Lines)

Jul 5, 2009

The following code selects a line ina richtextbox. It works OK expect from one problem:

When a line is biger than the size of the richtextbox, it wraps it. This create a big problem as I can not select the last line of the richtextbox (when a line is wrapped it becomes two lines). When I set wordwrap to off it works just fine

Private Sub RichTextBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles RichTextBox1.MouseMove

RichTextBox1.Focus()

[CODE]...

View 3 Replies

VS 2010 : RichTextBox Edit Line By Line, Keeping The Formatting?

Jul 7, 2011

I want to loop the lines of my RTB and add a vbTab on each line.How do i do this?

View 1 Replies

VS 2008 Reading RichTextBox Line By Line - Splitting It?

Jun 16, 2009

To read any form's text (except RichTextBox) line by line I've always used this splitting

Dim Lines() as String = Split(TextBox1.Text, vbNewLine)MsgBox(Lines(0))This code just works perfectly.But whenever I try this code on a RichTextBox like this:Dim Lines() as String = Split(RichTextBox1.Text, vbNewLine)MsgBox(Lines(0))The message box appears with the whole lines.I think maybe the RichTextBox1.Text() returns another new line character (means not vbNewLine).

View 7 Replies

Implement Line By Line Scrolling On Richtextbox?

Feb 8, 2011

I am trying to implement line by line scrolling on my richtextbox - Here is the initial code which I think is incomplete and doesnt work.I have VB 2010 Express?

Class RichTextBox1
Inherits RichTextBox
Private Const WM_SCROLL As Short = &H20A

[code]....

View 1 Replies

VS 2008 Delete Line Richtextbox If The Line Only Has One Value

Apr 23, 2010

how to delete a richtextbox line, if the line only has one value. Ex:

[Code]...

View 1 Replies

Get Current Word In Richtextbox?

Jun 1, 2012

how to get current word in richtextbox? the word may not be the last word and may not be the first word ...

View 6 Replies

Highlight Line By Line In Richtextbox?

Mar 10, 2010

i have 2 richtextbox,which will be compared with each other;array by array. if those array are same with each other;array1(3)=array2(3); then i will just display "*********" in another RTB3.but then if there are any differents between array1 and array 2, i will display error and state at which line does the errors occur.Next,i will highlight the error line in RTB1.and here is my problem.

i knew that i should use command below to complete the pogramme,but the part selection start,i dont know how to full fill it:

Richtextbox1.selectionstart =XXXXXXXXXXX
richtextbox1.selectionlength = array1(i).length
richtextbox1.selectionColor = Color.YellowGreen

View 2 Replies

Highlight Richtextbox Line By Line?

Jun 22, 2010

i'm trying to create a rogramme that will compare the arrays between richtextbox1 and richtextbox2. if there is any error(s),then i will highlight the current array line in the richtextbox1. e.g.,if array1(7) <> array2(7) then i will highlight only array1(7) which is in the richtextbox1.how can i do this...? I know already that i should use command beloow to settle the problem but

View 1 Replies

Read RichTextBox Line By Line?

Oct 12, 2011

I need help with reading a RichTextBox line by line I have this code:

For i As Integer = 0 To RichTextBox1.Lines.Length - 1
Label14.Text = (RichTextBox1.Lines(i))
Next

But can't get it to work It just skips to the last line

View 11 Replies

Forms :: Copy RichTextBox To An Array Line-by-line And Back To Another RTB From That Array?

Sep 6, 2009

How to copy RichTextBox to an array line-by-line and back to another RTB From that array?

View 2 Replies

VS 2008 - Add A ; At The End Of The Current Line?

Dec 13, 2009

I want to add a ; at the end of the current line I'm typing on by using ctrl+end or other keys.. im using a richtextbox..

View 2 Replies

.net - Updating Current Line In VB Console?

Oct 13, 2011

I am trying to write out to console a percentage of data loading. I tried to use C# syntax which would be Console.Write(" Percentage: " + nCurrent + "/" + nTotal; however in VB I get the actual character 'r' being displayed in my string. Is there a special code I need to insert in order to update my cursor to the beginning of the line so that I may reuse that line?

View 1 Replies

Asp.net - ASP, C#, And .Net Retrieve Current Line Number?

Oct 20, 2011

Does ASP, C#, VB.NET have a way to retrieve what line its on in code as its processing commands?

Example

1 <%
2 response.write("Your on line " & retreiveCurrentLineNumber)
3 %>

Output: Your on line 2

View 2 Replies

Retrieving Current Line Of Code?

Oct 2, 2009

Is it possible to (programmatically) retrieve the current line of code being executed? For example, I have program X that's only 200 lines long. Is it possible to tell a user "The current line of code is: ....."?Mods - Please do not mark my posts as answered. It is extremely rude. You have no idea if you've answered my question.

I WILL come back and mark the ones that are answers, as answers.

View 3 Replies

Get First Line In RichTextBox?

Sep 11, 2010

I need my app to enter each line of a richtextbox for a different field in my webpage.Currently what im thinking is:

Get string of first line in RichTextBox
Enter string into webpage
Delete first line in RichTextBox
loop

View 5 Replies

New Line In A RichTextBox?

Nov 10, 2010

how to create a list in a richtextbox, with every new item in a new line... just like:

1
2
3
etc.

I tried it like that:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a As Integer

[Code].....

View 3 Replies

New Line In RichTextBox?

Jun 18, 2012

I just created 5 Rich text boxes in runtime through a subroutine as:

Dim c As Control
c = New RichTextBox()
With c

[code].....

View 8 Replies

Insert Character At Start Of Current Line

Feb 9, 2010

Currently I have the code:textbox1.text = textbox1.text.insert(textbox1.getfirstcharIndexFromCurrentLine(),";")But this means it has to reload the entire textbox, which with large files is noticeable slow.What are the alternatives?

View 3 Replies

Determine If The Current Listview Line Is Selected Or Not?

Jun 4, 2012

how do i determine if the current listview line is selected or not?

Private Sub lst_DrawItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles lst.DrawItem
If lst.Items(e.Index).selected = True Then

[Code]....

View 2 Replies

Find Current Line In A Rich Textbox?

Jan 3, 2010

I have a rich text box where you can edit java code with a listbox on the side of it that has the line numbers. I want the listbox to scroll with the rich text box so that they line up. How would you get them to scroll as one?

View 1 Replies

VS 2008 : ListBox Current Line To String?

Dec 9, 2009

i need to convert the current line that is selected/displayed in listbox into a string

View 1 Replies

Add Text To New Line In RichTextBox?

Jan 24, 2010

How to add text to new line in a RichTextBox?

View 2 Replies

Delete Last Line In A RichTextBox In .NET?

Apr 1, 2012

I've been search and I can't found an answer that works, I need to remove (delete) the last line in a RichTextBox1 in vb .net, I mean remove last line and 'breakline' too, but only the last, no others,

View 1 Replies







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