caret

Flex: How to change caret (text cursor) in editable text area / text input

I need to put together an editable text area that has a custom caret (cursor) which is different from the default blinking vertical line. Is the caret a "skinnable" property of text input? Please note that I am not asking about the mouse pointer cursor which can be set using the CursorManager. Thanks. -Raj ...

contentEditable javascript caret placement in div

I have a contentEditable div. Let's say the user clicks a button that inserts HTML into the editable area. So, they click a button and the following is added to the innerHTML of the contentEditable div: <div id="outside"><div id="inside"></div></div> How do I automatically place the cursor (ie caret) IN the "inside" div? Worse. How...

TextField Caret Does Not Display in Actionscript 3

Hello all, I am trying to display a text field that has text inside it, and display the flashing Caret at the end of the text. I have tried the following: Code: // ti_title is my textField stage.focus = ti_title; ti_title.setSelection( ti_title.length, ti_title.length ); I have also tried: // ti_title is my textField ti_title.st...

How can I make the WPF TextBox scroll text into caret position?

The standard WPF TextBox control does not scroll the overflowing text into caret position as one types text into the control. Is it possible to create this behavior in a singeline WPF TextBox control? If so - How? An example of this behavior is the default way a HTML input type=text acts in most (if not all?) browsers. ...

show button if cursor is between two strings in a textbox (VB.net)

Basically I have a series of lines in a textbox like this: ### = 1232, 1234, 1236, 1238, 123A, 123C ; comment here I want to show a button when the caret (cursor pipe thing) in the textbox goes is in a number so like: ... , 12|31, .... or ... , 123|1, .... etc (the pipe being the caret) I have written code to check if it is in a numbe...

Silverlight TextBox, moving caret position

Hi, I am trying to make a TextBox behavior for an on-screen keyboard, it can update the text in the textbox but I can't get it to focus the textbox and move the caret to the end of the text once it's done updating. I have tried using TextBox.Focus() and TextBox.Select() in both orders with no luck. Thanks for your time ...

JFormattedTextField Caret Position on Focus

I am utilizing a few JFormattedTextFields in my program. For some reason when the text field gains focus after a click on the text field, the caret position always jumps to the left (position 0). I would like the caret to end up at the location clicked by the user. So if I click in between two digits, the caret should end up in between t...

current line number changed event if vb.net

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 sorry, I am using a richtextbox, just I always used it so I just call it a textbox in my thoguhts. ...

How to disable Caret Blinking?

Hi, I have created an Eclipse Editor (extends EditorPart) containing an TextViewer. I would like to disable the Caret blinking (I want an Caret allways visible)? How can i do? ...

Delphi Focus Problem seen by Caret

I have written an advanced text editor component (fixed-width, syntax highlighting, etc.) in Delphi, using Windows API combined with the TCanvas element, and it works great, except for one thing: If I set focus to another control inside the same application that displays a caret as well, such as a TEdit, stealing focus from my editor com...

What does the caret operator (^) in Python do?

I ran across the caret operator in python today and trying it out, I got the following output: >>> 8^3 11 >>> 8^4 12 >>> 8^1 9 >>> 8^0 8 >>> 7^1 6 >>> 7^2 5 >>> 7^7 0 >>> 7^8 15 >>> 9^1 8 >>> 16^1 17 >>> 15^1 14 >>> It seems to be based on 8, so I'm guessing some sort of byte operation? I can't seem to find much about this searching ...

Setting the a caret in an JEditor Pane causes an exception.

I have a JeditorPane which has some text in HTML format. When I execute the following command int len = editorPane.getText().length(); The value for len is 7473. But then I try to do the following: editorPane.setCaretPosition(4995); And I get the following exception: java.lang.IllegalArgumentException: bad position: 4995 My un...

scroll/search JList when user starts typing

I would like to implement one of the fanciest features I every now and then. I would like to allow a user to click on a JList and if words are typed, do a query and advance the caret to the next match (prefix). Is there and example of such an implementation in Java somewhere? I'm thinking a combination of key listeners, getNextMatch() an...

Set caret position in contenteditable div layer in Chrome/webkit

Hello, I'm trying to set the caret position in a contenteditable div layer, and after a bit of searching the web and experimenting I got it to work in firefox using this: function set(element,position){ element.focus(); var range= window.getSelection().getRangeAt(0); range.setStart(element.firstChild,position); range.set...

BB Code Parser (in formatting phase) with jQuery jammed due to messed up loops most likely

Greetings everyone, I'm making a BB Code Parser but I'm stuck on the JavaScript front. I'm using jQuery and the caret library for noting selections in a text field. When someone selects a piece of text a div with formatting options will appear. I have two issues. Issue 1. How can I make this work for multiple textfields? I'm drawing a b...

RichTextBox doesn't update caret position correctly

I have a handler consuming the keyDown event of a WinForms RTB, that has the following code: GetTextAtLoc(RTB->SelectionStart); // selects some text at the caret's position RTB->SelectedText = "SomeOfMyOwn"; GetTextAtLoc(RTB->SelectionStart); // selects the replacement string RTB->SelectionStart += RTB->SelectionLength - 1; While this...

Silverlight Textbox scrollviewer problem

In silverlight, I got a textbox which I want to be multiline and have mousescrolling available. If I only use textbox then I dont have mousescrolling. If I use a scrollviewer I will have mousescrolling. BUT everytime my writing exceeds the rows that are shown from start the text and caret just dissapears without the scrollviewer doing...

Trying to get focus onto JTextPane after doubleclicking on JList element (Java)

Hi all. Problem: I have the following JList which I add to the textPane, and show it upon the caret moving. However, after double clicking on the Jlist element, the text gets inserted, but the caret is not appearing on the JTextPane. This is the following code: listForSuggestion = new JList(str.toArray()); listForSuggestion....

Clipping the caret in a C# program

I'm creating a WinForms control in C# (using VS2008, .net 3.5) which allows text input. I've imported the necessary Win32 API functions from User32.dll for displaying the normal Windows caret and these are all working fine, but it's not displaying exactly how I'd like it. Text is displayed on the control with a blank border and I use Gr...

Tag-like autocompletion and caret/cursor movement in contenteditable elements.

I'm working on a jQuery plugin that will allow you to do @username style tags, like Facebook does in their status update input box. My problem is, that even after hours of researching and experimenting, it seems REALLY hard to simply move the caret. I've managed to inject the <a> tag with someone's name, but placing the caret after it s...