Flex :: Set Caret Cursor Position In RichEditableText Control?

Dec 1, 2010

Is there a method to set the caret position within a RichEditableText control? The control's contents can contain errors that the user must fix which are navigated though via Next/Previous buttons, and during the navigation I would like to set the caret cursor to the end of each error within the text.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Set Caret (cursor) Position In A TextField From A KeyEvent

May 15, 2011

I'm building part of an UI that suggests certain words based on to the user's input. (Quit like Google's suggestions) It works quite well but one detail bothers me: When I have a list of suggestions I highlight the list-items by listening to the arrow up and down keys. When the fist element is highlighted, and the user presses the up arrow, I want the cursor to be in the Text(Input)Field again, but at the last position.
 
(I removed the focus from the InputField not to move the cursor in my singel line field to the first position when the up-arrow is pressed)
 
I set the cursor to the last Position using setSelection() but as it is the field receives the key-press after my event callback is executed and the pressing of the up-arrow in a single line field does what it always does, it places the cursor at the first position.
 
I considered using the CHANGE event, but as the arrow key does not actually change the content of the TextField, that is not working. Still I think that the solution might be along that way, as the CHANGE event is/would be at the end of the event-chain, where I need to do the repositioning of the cursor.

View 8 Replies

Flex :: Control Cursor (carat) Position In TextInput?

Sep 15, 2011

I need to handle diagraphs and then convert them on the fly to the proper unicoderepresentation. For example when the user types in:SxMy app needs to replace it with:ow, I've been able to do the replacement no problem. The issue though is that once I've done the replacement, the cursor goes to the beginning of the textbox rather than the end.As I'm trying to update the user's text on the fly, this obvious doesn't work.

View 3 Replies

Flash :: Insert Text At Cursor In A TLF-based Flex Spark RichEditableText?

Oct 8, 2010

I want to programmatically insert formatted text at the current cursor position in a Flex 4 (Spark) RichEditableText control. I could just modify the .text property But that doesn't allow me to insert formatted text. So I believe I need to interact with either .textFlow or .textFlow.interactionManager somehow? However, TLF is quite complex and I can't find a simple way to do what I want.

View 1 Replies

ActionScript 2.0 :: [CS3] MC Control By Cursor Position?

Jan 27, 2009

Basically I want an MC to appear or disappear depending on the mouse proximity to it. Say for example I have a nav which only becomes visible as the mouse moves to the right hand side and then disappears as it moves away.

Previously I have used the old invisible button trick that triggers the MC as the mouse moves over it. Yes im well aware that is frowned upon and is not 100% effective but as of yet thats the only method I know.

View 4 Replies

Actionscript 3 :: In Combobox Editable Text How To Control Cursor Position

Jan 31, 2011

I have a class which inherit from ComboBox .i want to implement a function to control the position of the cursor.Any builtin function?

// Copyright (C) 2003-2006 Adobe Macromedia Software LLC and its licensors.
// All Rights Reserved. The following is Source Code and is subject to all
// restrictions on such code as contained in the End User License Agreement

[code].....

View 2 Replies

ActionScript 2.0 :: Control Of Cursor Position In Landing Email Program When I Use Mailto?

Oct 18, 2009

Can I have a control of cursor position in the landing email program when I use mailto? I think it looks more professional when the cursor goes into Subject field rather than falling right behind my email address in To field. The following snippet that I tried didn't make any difference. [code]...

View 3 Replies

Flex :: Change Caret (text Cursor) In Editable Text Area / Text Input?

Nov 23, 2009

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? note that I am not asking about the mouse pointer cursor which can be set using the CursorManager.

View 1 Replies

ActionScript 3.0 :: Setting Caret (flashing Cursor) When Focus On Text Field?

May 4, 2009

I want to have the caret (flashing cursor) to appear when I set the focus to a text field. It works fine when the user clicks on the text field.

the following does not seem to work for me:

Code:

stage.focus = mytxtfield
mytxtfield.setSelection(mytxtfield.text.length,mytxtfield.text.length);

When I try this it merely focuses on my text field and no caret comes up! mytxtfield is the instance name of my input type textfield.

View 4 Replies

ActionScript 3.0 :: Caret Position Out Of Sync With Text

Mar 25, 2009

I've discovered a bug that is extremely confusing to me. Basically I have some text fields that are dynamically created, but once users start typing in them, the caret cursor slowly either falls behind the text your typing or sometimes get's way ahead of where your typing. The result is frustrating when you are trying to delete something because you aren't really sure where the caret actually is. I've attached some code that you can paste into an fla to reproduce the issue.

View 2 Replies

Actionscript 3 :: Setting Caret Position In Text Layout Framework?

Jul 3, 2010

i'm attempting to simply set the caret position at the start of the text flow when it is first displayed, without having to click and activate the text to see the blinking caret.

googling returns that the solution is to do this:

textFlow.interactionManager = new EditManager(new UndoManager());
textFlow.interactionManager.setSelection(0, 0);

however, setSelection() is not a valid function of the selection or edit managers.

1061: Call to a possibly undefined method setSelection through a reference with static type flashx.textLayout.edit:ISelectionManager.

View 1 Replies

Flex :: Set Combobox Cursor Position?

Mar 17, 2010

I have a combobox implementation as follows - Based on user input (min 2 chars) in the editable combobox, the data provider is refreshed and drop-down opened, showing different data sets as user input varies.Problem is that after drop-down opens, the cursor moves back to the beginning. So for instance, the user types in "ab", and wants to type in "c" to form the search string "abc". Due to the cursor re-setting its position to 0, the search string instead ends up as "cab".Here's what I tried already (doesn't work) : textInput.mx_internal::getTextField().setSelection(index, index);

where index = length of user input. This selects text from index to index (which effectively un-selects text) and is supposed to place the cursor at the end.

View 1 Replies

Flex :: Get The Cursor Position Of TextLayoutformat/textFlow

Jan 26, 2011

How can I get the cursor position of flex textLayoutformat/textFlow.

View 1 Replies

Actionscript 3 :: Get Word Under Current Cursor Position In Textarea In Flex 4

Oct 2, 2011

I'm using flex4 for creating an editor. There I need to get word under current cursor position. say for example, this is the text in textarea, "Hi, this is a sample" and cursor under "this" word. If I click a button, then this "this" word must be returned. All this I need to implement in flex4 and actionscript3.

View 1 Replies

Flex :: Calculate Line Number Relative To Cursor Position In TextArea?

Jun 11, 2009

How can i find line number in events like mouse clicked, key down and key up. And also highlight that line with color. I used TextArea.

View 1 Replies

IDE :: Cursor Position Not Mouse Position In Input Text Box

Nov 12, 2009

I have an Input Text area that users can edit and then submit. I need to be able to show, on screen, the cursor's current position as they type. I don't need to know where the mouse is but all work-arounds I've found so far can only tell me the mouse position. The font for the text is 'courier' or 'courier new' and the Input Text area is scrollable.

View 8 Replies

Flex :: Set The Scroll Position For A Spark List Control?

Aug 9, 2010

How can I set the scroll position for a Spark List control?

View 1 Replies

Control A Spark Datagrid's Scroller Position In Flex?

Aug 22, 2011

I'm using the new Spark Datagrid for a project, but I must confess the scroller is annoying me a little bit, so I would like to have some control over it.

View 1 Replies

Actionscript 3 :: Flex - Tree Control Drag Drop .item Position?

Dec 9, 2009

just facing a difficulty with tree control drag drop..Suppose i have tree with drag-drop enabled.I want to which node(id) is droped inside which node. 1]if i drag "Cat1" node inside "Cat3",i want to identify ids of siblings of "cat1",and "cat3".2]in general i want to know the ids of current element being moved along withits new parent and new position and save these postions.3] Also "cat4" when moved outside "cat3",i want know its position and its siblings id.

<mx:XML id="treeDP">
<node label="Categories">
<node label="Cat1" id="1" isBranch="true"/>

[code].....

View 2 Replies

Flex :: Selecting Id Of TextArea (despite RichEditableText)

Jun 17, 2010

I'm trying to select the id of a textArea when it's focused in

[Code]...

Problem is TextArea is made up of RichEditableText so target doesn't actually refer to TextArea. I've tried event.target.parent.id but still not getting there. Anyone knows how to get to the bottom of this?

View 2 Replies

Flex 4 RichEditableText With Right Click Menu?

Sep 13, 2011

I need selectable text that can be copied. Some users are used to copy with Ctrl+C (Cmd+C on Mac), and some are used to right click and select "Copy".

Using s:RichEditableText, there is no "Copy" in right click menu: http://d.pr/xWXW. Using mx:Text, there is "Copy" in right click menu, but it doesn't copy anything: http://d.pr/vtiw

Ctrl+C works for both s:RichEditableText and mx:Text.

Is there a property or something to enable "Copy" in right click menu for s:RichEditableText?

View 1 Replies

Flex :: Detect Right Clicks On A RichEditableText?

Oct 21, 2011

I am currently implementing squiggly in a flex application to enable spell checking. Due to certain requirements, I can not use SquigglyUI to hook onto my spark RichEditableText.I have successfully used com.adobe.linguistics.utils.TextTokenizer to tokenize and highlight mispelt words.I would like to be able to let the user rightclick on a mispelled word and show a I have tried to attach a listener to my RichEditableText:

richtexteditor.addEventListener("rightClick", showSuggestions);
And this is my event handler:
private function showSuggestions(event:MouseEvent):void{

[code].....

View 2 Replies

Flex :: Caret On TextInput Never Goes Away

Jan 29, 2011

I have a login form with various textInputs and a submit button. If you submit proper login credentials the system unloads the login view and loads the app view. Pretty standard. Unfortunately I've noticed this weird bug where if you hover over one of the textInput boxes with the mouse, then fill the form using only the keyboard (and leave the mouse parked on top of the textInput), and then tab to the submit button and press the space bar, i.e. login via keyboard, the mouse cursor will remain a caret in the new view, no matter what you do (move, click), until you find another textInput to undo the cursor state. I've tried to do all sorts of stuff via CursorManager but nothing seems to do the trick. I've tried dispatching events ROLL_OUT or MOUSE_OUT events to the textInput but that doesn't do the trick either.

View 2 Replies

Flex :: GetCharIndexAtPoint() Equivalent In Spark RichEditableText?

Mar 25, 2010

I want to find a way to get the character index in a Spark based RichEditableText based on mouse x, y position.The mx.controls.TextArea has a protected getCharIndexAtPoint() method but I can't find an equivalent of this in the Spark RichEditableText which is disappointing.

View 3 Replies

Actionscript 3 :: Flex 4: Detect Click Outside Of RichEditableText

Sep 10, 2010

Is there any easy way to detect click outside of RichTextEditable? just like FlexMouseEvent.MOUSE_DOWN_OUTSIDE is used in popups.

View 3 Replies

Flex :: Autosize - RichText/RichEditableText Autosizing?

Mar 21, 2011

In the past, I used the flash.text.textField object something like this:

tf = textField();
tf.autoWrap = true
tf.autoSize = "left"
tf.width = 100;

[Code]...

I'm coding this, so if you have some suggestions, please post them in code, not MXML.

but UITextfield is not a TLF component and the example for RichText does not cause the RichText height to grow with the text. What I need is a component that I can set the width, add TLF formatted text and get the height of the component once it has rendered. Just like a TextField does when you add text.

View 3 Replies

ActionScript 2.0 :: Mouse X Position To Control Movie Position?

Feb 1, 2006

Basically the x position of the mouse should control the play position of a movie. Do I need something like an event handler (I'm not sure exactly what these do, but I've seen similar scripts that seem to use them).

View 2 Replies

Flex :: RichEditableText Component Not Completely Resetting Its View

Mar 1, 2011

I'm experiencing some strange text rendering behavior in the Spark RichEditableText component.

<?xml version="1.0" encoding="utf-8"?>
<s:Application
xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
[Code] .....

The above application simply navigates through the five sentences in the DATA array (every time the Next button is pressed). For whatever reason, RichEditableText component doesn't completely reset its view (by clearing the previous text) before setting new content. From what I can gather, this faulty rendering is somehow based on the combination of line count and relative width. I also discovered that if I set the width property of the RichEditableText component to an absolute value (say, 100) as opposed to relative (percentage, 100%) the text is rendered correctly. As far as I can see, this behavior is unintended and is, in fact, a bug.

View 1 Replies

Flex - Possible To Select Text Between Multiple RichEditableText Objects?

Aug 15, 2011

For example, say I have 3 RichEditableText objects and I want to be able to highlight them all together:

<s:RichEditableText id="obj_one" width="100%" text="Click and start dragging the highlight here..." selectable="true" editable="false" fontSize="9" />
<s:RichEditableText id="obj_two" width="100%" text="Continue dragging the highlight through this one" selectable="true" editable="false" fontSize="9" />
<s:RichEditableText id="obj_three" width="100%" text="and keep going and finish highlighting them all right here" selectable="true" editable="false" fontSize="9" />

Is it even possible to make it so all three could be highlighted that way someone could Copy all three at once then past all the text somewhere? I should clarify, The reason they would be like this is because there they are in an itemRenderer so they would each be their own object in each line on the list. It would be nice though if the text could be highlighted and copied like it was all together though. Just imagine the way an end user would expect to be able to drag an highlight any other text in a standard html document to paste elsewhere.

View 2 Replies

Flex :: Tooltip On Image Element Inside RichEditableText

Aug 20, 2011

I have the following:[code]I want to display a tooltip on the img element - haven't figured this one out - ideas anyone?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved