caret position
-
Hi guys, This is what I am trying to do. Basically, I have a couple of data and I want to insert them into specific positions in a rich text box. Now i am able to copy the data onto the clipboard. the next step is to be able to move the caret to the specified index position and then be able to paste the data from the clip board. my question is, how do i make the caret to move to the specified index position. thanks Nana
-
Hi guys, This is what I am trying to do. Basically, I have a couple of data and I want to insert them into specific positions in a rich text box. Now i am able to copy the data onto the clipboard. the next step is to be able to move the caret to the specified index position and then be able to paste the data from the clip board. my question is, how do i make the caret to move to the specified index position. thanks Nana
There's a selectedText property, from memory. Whatever it is, you set the selected text to be the position you want, and a length of 0. This places the caret where you want it, without selecting anything. Christian Graus - Microsoft MVP - C++
-
Hi guys, This is what I am trying to do. Basically, I have a couple of data and I want to insert them into specific positions in a rich text box. Now i am able to copy the data onto the clipboard. the next step is to be able to move the caret to the specified index position and then be able to paste the data from the clip board. my question is, how do i make the caret to move to the specified index position. thanks Nana
You are looking for the SelectionStart[^] property. Like Chris said, set SelectionLength to 0 and set SelectionStart to the caret position. Regards Senthil _____________________________ My Blog | My Articles | WinMacro