473,395 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

richtextbox question

Eps
I have a richtextbox and I want the user to be able to press a button
and have some specific text inserted in to the richtextbox at the
current position of the text cursor. I have been looking at the MSDN
docs for richtextbox but I can't seem to find the property or method
that will give me the position of the cursor.

Any help appreciated.

--
Eps

http://ukcomment.blogspot.com/

A UK political Blog
Nov 17 '05 #1
3 1635
private void button1_Click(object sender, System.EventArgs e)

{

this.richTextBox1.SelectedText=" INSERT ME ";

}

--
OHM ( Terry Burns )

http://TrainingOn.net


"Eps" <ep*@mailinator.com> wrote in message
news:d3**********@domitilla.aioe.org...
I have a richtextbox and I want the user to be able to press a button and
have some specific text inserted in to the richtextbox at the current
position of the text cursor. I have been looking at the MSDN docs for
richtextbox but I can't seem to find the property or method that will give
me the position of the cursor.

Any help appreciated.

--
Eps

http://ukcomment.blogspot.com/

A UK political Blog

Nov 17 '05 #2
Eps
OHM ( Terry Burns ) wrote:
private void button1_Click(object sender, System.EventArgs e)

{

this.richTextBox1.SelectedText=" INSERT ME ";

}


Thanks, and yes i do feel stupid.

--
Eps

http://ukcomment.blogspot.com/

A UK political Blog
Nov 17 '05 #3
Dont feel that ! We all miss the obvious from time to time, and I am no
exception, trust me !.

:)

--
OHM ( Terry Burns )

http://TrainingOn.net

"Eps" <ep*@mailinator.com> wrote in message
news:d3**********@domitilla.aioe.org...
OHM ( Terry Burns ) wrote:
private void button1_Click(object sender, System.EventArgs e)

{

this.richTextBox1.SelectedText=" INSERT ME ";

}


Thanks, and yes i do feel stupid.

--
Eps

http://ukcomment.blogspot.com/

A UK political Blog

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JRB | last post by:
I have a thread adding lines of text to a richtextbox on my windows form about every 1 second. I want the last line of text to always be visible, which it is until the box gets filled up. The last...
6
by: Just Me | last post by:
I've seen code that copies a bmp file into a RichTextBox by first putting it into the clipboard and then using Paste to get it into the RichtextBox. This destroys the clipboard contents. Is...
3
by: michael sorens | last post by:
The documentation for the RichTextBox is sketchy at best. I want to do a very simple task but I cannot find information on this. I am using a RichTextBox as an output window. Some text I want to...
1
by: eBob.com | last post by:
After a lot of debugging effort I have to conclude that it does. Or at least can. I take a substring (RichTextBox.Text.Substring) before setting SelectionStart and after and get a different...
1
by: dshubhangi | last post by:
hi I've set richtextbox OLEDropMode Manual,catched OLEDragDrop event & in that event written below code Richtextbox1.OLEObjects.add ,,data.files(1) Now I'm able to catch OLEDragDrop as well as...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.