Questions tagged [getcaretpos]

29 questions
1
vote
2 answers

Bad caret position message

Here's a message I am plagued by, which occurs when I attempt to programmatically "select" cells (whether empty or not) in a grid via keypress combo shift-rightarrow or shift-leftarrow: Exception in thread "AWT-EventQueue-0"…
DSlomer64
  • 4,234
  • 4
  • 53
  • 88
1
vote
0 answers

How to make Jtextpane autoscroll and add a scrollbar

I have added a jtextpane and am trying to make it autoscroll to the bottom when I added another line of text which goes past the last line of the rectangle. I also would like to add a scrollbar so people could scroll back up to see old text. I have…
Cameron Roberson
  • 111
  • 4
  • 20
1
vote
0 answers

techfoobar AutoComplete JSfiddle

I would love if techfoobar could help me figure the problem out. If someone can let him know about this question, I would appreciate it. Either way, I was looking at the fiddle: http://jsfiddle.net/VwNHN/ and I have it working on my site. My only…
x10
  • 11
  • 1
1
vote
1 answer

textarea caret position when shift and arrow keys are used?

I found a few nice answers for finding the caret position in a textarea but I have yet to find one that can detect the caret position after the shift key is held and arrow keys are used. When the shift key is held the cursor could go back or forward…
user978923
0
votes
1 answer

javascript FreeTextBox get caret position (IE)

Hi im trying to get the caret position inside the freetextbox this only needs to work in IE, i have no idea how to do it tried a few scripts that i found with google but non of them worked and even after trying to fix them they did not give the…
Peter
  • 37,042
  • 39
  • 142
  • 198
0
votes
1 answer

How to get the CaretPosition on textbox using GetCaretPos() or any other method?

I am trying to make a new application on C#, as a part of this I want to know the caret position (The exact point within the control) on a rich text control box. I will explain it: assume I have a win form, rich textcontrol box and a…
Dileep DiL
  • 83
  • 1
  • 1
  • 6
0
votes
1 answer

GetCaretPos Error Invalid Access Memory Location

I'm trying to call the GetCaretPos function in User32.dll from an NSIS installer, and the only thing I can seem to get is an invalid access to memory location error. Here is my code: Function fixUpRegKeyText Exch $0 ; HWND to text box …
davidtbernal
  • 13,434
  • 9
  • 44
  • 60
0
votes
1 answer

Javascript Chrome Extention get caret coordinates

I just started with a new chrome extension however I couldn't find how to get the exact caret (text cursor) position in JavaScript code chrome.commands.onCommand.addListener(function (command) { console.log('Command:', command); if (command…
0
votes
1 answer

How to set Selection start based on Mouse Position WinForms

I need to set Selection start of a text box based on the mouse position, i tried to load the text box on Double Click, once the text box is loaded, i need to set the selection start based on the Mouse position. (i.e) if a text box contains some…
venkatesan r
  • 249
  • 3
  • 15
0
votes
0 answers

JavaScript Caret/Cursor repositioning after removal of HTML elements within editable DIV

After performing a regular expression, which is basically just removing HTML elements inside my editable div, my caret position gets lost after I perform a innerHTML. Even thou I am saving the last position of the edit, I cannot restore my caret…
marius
  • 1,118
  • 1
  • 18
  • 38
0
votes
0 answers

Caret in JTextPane not moves when moving forward or backward within the text line

I am working with a terminal emulator, whose main view placeholder is a JTextPane. Whenever a character is typed, out.write(c) is executed, and then a function is called that does the styling of characters and inserts the text strings in JTextPane…
user123
  • 15
  • 6
0
votes
2 answers

Cannot open system clipboard exception thrown on setCaretPosition

I have JEditorPane (communicationView) in my Swing application, and sometimes I need scroll it to the bottom. Scrolling is done by setting caret position to the document end. private void setCommunicationViewCaretPosition(){ …
live_for_this
  • 51
  • 1
  • 10
0
votes
1 answer

Find caret position inside element

I have a span inside the contenteditable div and I need to figure out if the cursor is in the last position on the span tag. I looked in the Selection and Range solutions but couldn't figure out a straight forward way to achieve that. …
Ohad Sadan
  • 877
  • 6
  • 15
0
votes
1 answer

Print string to Caret position in JEditorPane when Ctrl+C is pressed

I'm trying to print out a certain string to the current caret position in a JEditorPane when CTRL+C is pressed. I'm not sure how to handle two key events and print to current caret position. The APIs do not do a good job of describing them. I figure…
1
2