I don't think you need to extend any classes. You already know what the text is in the Text Input and you already know the text that the user is dragging so all you need to know is where the user has the mouse at the current moment and where they release the mouse button. The first is so you can place a vertical bar inside the text to show where the drop should happen. The second is where they let go of the mouse and the insert should happen. http://livedocs.adobe.com/flex/3/html/help.html?content=containers_intro_5.html should give you an idea of how to get the mouse position. Then all you need to do is grab both pieces of text, merge them at the mouse position and put the result back in the text input.
--- In [email protected], "gareth_arch" <gareth_a...@...> wrote: > > Yeah, that's what I meant. I never ended up changing the arrow to a hand. > It's the blinking "I" (when you click in a TextInput) that is causing the > issue. The CursorManager only seems to be for switching the mouse cursor, > not stopping the blinking "I" insertion thing from making Flex think it's > inside the TextArea still. > > My latest issue is that I'm trying to figure out how to allow the user to > insert the text at the exact drop point of the mouse cursor (previously I was > just replacing what was in there with the selected text). Will I have to > extend TextInput and TextArea so I can access the protected TextField or is > there a method within the TextInput and TextArea that I can reference > externally (without the need to extend the Flex components)? > > --- In [email protected], "valdhor" <valdhorlists@> wrote: > > > > There are other cursors you can set it to. That one was to set it back to > > the standard system cursor. > > > > --- In [email protected], "gareth_arch" <gareth_arch@> wrote: > > > > > > This appears to just be for the mouse cursor. It's actually in the > > > TextArea itself (the blinking "I" bar). I got it working by doing a > > > this.setFocus() in the component outside of the TextArea, then it removes > > > the focus. > > > > > > --- In [email protected], "valdhor" <valdhorlists@> wrote: > > > > > > > > When the drop is made, use the CursorManager class to set the cursor... > > > > > > > > CursorManager.setCursor(CursorManager.NO_CURSOR); > > > > > > > > --- In [email protected], "gareth_arch" <gareth_arch@> wrote: > > > > > > > > > > OK, very close with this now. > > > > > > > > > > The final thing is that after I have dragged the value to the > > > > > TextInputs, and dropped the value into them, the original TextArea > > > > > still thinks the mouse is over it (so as you move the mouse around it > > > > > looks like the mouse is still clicked in the TextArea and selects and > > > > > deselects the text). > > > > > > > > > > I've tried firing mouse_click and mouse_out events from the TextArea, > > > > > or setting the begin and end indices to 0, but nothing seems to stop > > > > > it from "thinking" the mouse is still clicked in the TextArea. > > > > > > > > > > --- In [email protected], "gareth_arch" <gareth_arch@> wrote: > > > > > > > > > > > > Our end user is wanting us to try to build something where they can > > > > > > drag text from the left side (in a TextArea) to TextInput boxes on > > > > > > the right hand side. > > > > > > > > > > > > I've tried some different ways to try to accomplish this: > > > > > > > > > > > > Making the TextArea draggable - This then prevents using the mouse > > > > > > to highlight the text because as soon as you start to select the > > > > > > text, you are now dragging the textarea. > > > > > > > > > > > > Trying to get the selected text, but it gets deselected as soon as > > > > > > you "re-click" the selected text. > > > > > > > > > > > > My latest solution (which I thought *might* be OK with the end > > > > > > user) is adding a mouse_up listener to the textarea, which then > > > > > > adds the selected text to a variable. The user can then double > > > > > > click the TextInput box, and the previously selected text is added > > > > > > to the TextInput.text This got an "ah, hmm" from our end user, so > > > > > > I'm trying to figure out something else, or this will be it :) > > > > > > > > > > > > I'm trying to figure out how to keep the text selected "on > > > > > > re-click"...so highlight text with mouse, left click on selected > > > > > > text (text stays highlighted), and then I can use the DragManager > > > > > > and some finagling to get the text to the TextInputs hopefully. > > > > > > Only problem is, as soon as I re-click, the selected text is > > > > > > deselected. Any way to prevent this from happening (or any other > > > > > > solutions that someone might have are always welcome)? > > > > > > > > > > > > Thanks. > > > > > > > > > > > > > > > > > > > > >

