RichTextBox | Select Line On Click?
May 24, 2012
Im Stuck On another project.I Have a Read Only RichTextBox, and I Want to make it so when I click on a line of text in the richtextbox, that it selects or Highlights the whole line, and Just that one line.
View 2 Replies
ADVERTISEMENT
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
Jun 13, 2010
I have a RichTextBox in a VB2008 Windows Form application. The RichTextBox has tabs set at 250 and 400. The following code snippet is used to populate the RichTextBox using the result of a LINQ query.
rtbData.AppendText(String.Format("{0}.
{4}{1}. {4}{2}{3}", strTitle, strAuthor, strBook, ControlChars.CrLf, ControlChars.Tab))
I've noticed that most of the time it takes several mouse clicks to highlight a desired line of text in the RichTextBox. Is there some code that will allow selecting the entire line that a user clicks on? The length each line in the RichTextBox is not the same.
View 3 Replies
May 18, 2009
I need a command that will select all the chars that fall on a known line of a richtextbox.
View 2 Replies
Jun 20, 2012
when I click on rtb how do I assign clicked line (text of that line) to a variable 'x' and a line below to a variable 'y'? I have so far this
SendKeys.Send("{DOWN}") 'Move cursor to next line
SendKeys.Send("{HOME}+{END}") 'Select the line
View 1 Replies
Dec 17, 2010
I'm trying to make a tool that supposed to do the following.
When I type i.e. the number 12345678 in TextBox1 and click on Button1. The number should go to RichTextBox1 on a new line with the text:
There Are 12345678 Bannana
Now, when I fill in at TextBox1 12345679 and click on Button1, a new line should be added to RichtextBox1, making it:
There Are 12345678 Bannana
There Are 12345679 Bannana
And so on...
What ever I try I cant get this to work,
View 9 Replies
May 2, 2011
How can I one click select a word, or line, or paragraph on web page? Instead of having to double click for example to get a line/paragraph. I found this article which is almost similar to the problem I have. [URL].
View 2 Replies
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
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
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
Apr 23, 2010
how to delete a richtextbox line, if the line only has one value. Ex:
[Code]...
View 1 Replies
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
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
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
Jan 31, 2009
How can I make a program so you click a button and select a File using a OpenFileDialog and click send on your computer and it will send the file to a different computer and then a SaveFileDialog will show asking where to save the file on the other computer. Oh ya I cant use WinSock or whatever becuase im using Windows Vista 64 Bit. I need it because I for some reason cant use printer sharing. It might be because im on A 64bit Vista Machine and I want to print a file off of a 32bit XP Home Machine.
View 6 Replies
Sep 6, 2009
How to copy RichTextBox to an array line-by-line and back to another RTB From that array?
View 2 Replies
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
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
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
Jul 7, 2010
I was wondering how can I select all of the images in a richtextbox at runtime .For example, suppose a file is loaded into a richtextbox control (system.windows.forms) [code]...
View 2 Replies
Jan 24, 2010
How to add text to new line in a RichTextBox?
View 2 Replies
Dec 28, 2008
How do i change a line in a richtextbox?[code]...
View 4 Replies
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
Sep 22, 2010
How do I get all the text in a string of a text line in a RichTextBox?
View 2 Replies
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
Oct 7, 2010
How do I retrieve the text from each line of a RichTextBox So if the user enters:
Random 1
Random 2
Random 3
How could I get each line, returning 'Random 1', 'Random 2', and 'Random 3'?
View 1 Replies
Jun 5, 2009
I wonder is there any way to highlight a line in a richtextbox once the user hovers the cursor over it and get its value? I am also looking for a way to define the colour of the selection (e.g., blue, balck, etc)
View 2 Replies
Mar 21, 2010
i've created a project to highlight a few line in richtextbox1.but why cant i highlight the last line?below is my code:[code]
View 3 Replies
Jul 29, 2009
I'm writing to a RichTextBox using the with command:
With RichTextBox
.AppendText("blablabla" & vbCrLf)
.ScrollToCaret()
End With
But sometimes I would like to overwrite what I've just written instead of writing it on the next line.
View 4 Replies
Apr 24, 2010
I want to get only the last line of richtextbox. i tried this but it returns every thing in the richtextbox
[URL]
View 3 Replies