i need to know which part of the text is been modified by the user inside a Flex TextArea. I'm listening to TextArea's Event.CHANGE and my code run on everychange but i don't know what the user have done to the text and it's too long to process it again at every keypress or paste
We are still with Flex 3.5 but i may consider Flex 4 if the solution is easier.
Thanks a lot
Consider using focusOut and firing your function when the user leaves the text area.
Related
I have reached an impass which means I have to spend many hours doing something in a very tedious way because I can't work out a way to do it quickly, here is my problem.
In flash if I make a button that consists of a rectangle and a text field then make it all a button symbol, if I then copy the symbol to multiple instances on screen and change the text in one of them, it changes in all of them because I am changing the symbol.
How can I overcome this, perhaps with actionscript? I tried writing.
button1.text1.text = "test change button text"; on the main canvas (and giving one button a name of button one and the text field within it text1) but it doesn't work.
The only thing I found that works was to make multiple symbol copies of the button but then if I want to change the colour or dimensions of all the buttons it takes ages.
Is there a better way? Using actionscript 2 perhaps, or just some property of the button to allow individual text?
I attempted your situation... and I didn't run into your problem. Text boxes are individual values, provided that the text box is dynamic or input
I think that what may solve your problem is checking what kind of text boxes you are working with. Look in the properties panel; does it say "dynamic"?
I'd like to have two textboxes, one that is large and read-only, with content from the server, and another that is one line and that searches the first text box. The word the user puts in TextBox2 would be highlighted/bolded/whatever in TextBox1.
Example:
TextBox1:
This is an example of the possible contents of my read-only text box. It would go on for a bunch of lines...
TextBox2:
box
Is there any way I could do this? I've thought about using the AutoComplete TextBox from the AjaxControlToolkit and setting the Service Path to wherever I'm getting the contents of TextBox1. But that's not doing exactly what I want, because I'd like to interrupt the suggestions and use them to search TextBox1. Any ideas? I'm pretty new to asp.net and just fishing around for somewhere to get started on this one.
I would recommend a JQuery plugin like this. I don't think it will work with a textbox, but you could try. Do you have to use a textbox for the first one? Could you use a DIV instead, if it doesn't work?
An example of usage:
$('target').highlight('box');
I am creating a mobile app using FB4.6/AIR. I am running into several issues when I have TextInput fields in my view. If I have a TextField (StageText) that has text pre-populated in it (i.e. from a data object), when the view loads, the TextField will flash the text until it eventually stops and the text disappears. Upon selecting the TextField, the text will reappear. Obviously, this is not an ideal situation. So, after doing some research, I bypassed using the StageText by using the SkinClass - 'spark.skins.mobile.TextInputSkin'. This fixed the flashing text issue, however, now upon entering text in the TextField, after a certain point, the text seems to duplicate itself several times over, so that the the word, in this case an email address, becomes unrecognizable (i.e. John.Doe#MyEmail.com would become John.Doe#MyEmail.com#MyEmail.comJohn.Doe#My).
Obviously, I need to find a solution for one of these situations. Suggestions?
Thanks, in advance.
I have a mobile application that has a Text Input used for searching. Below the search TextInput is a StageWebView. When I set the source of the StageWebView using loadURL() the key input is shifted to the StageWebView.
How can I prevent this?
I think I figured out the problem. When you set the stage property (which is basically setting the visibility to true) that's when it steals the focus. I was showing and hiding the web view depending on if the text input had any text (I was updating the webview source on text change). The fix was to set the web view to visible before putting the cursor in the Text Input. As long as the visibility doesn't change the focus stays in the text input.
I dont know if there is a better way but my solution is to try to set the focus back to the textInput by using myText.setFocus() after your load routine.
I am beginning to start implement a paging mechanism in my flex application and I am wondering where do I start off. Some examples that I have seen on internet work on plain text whereas I have the text in the text flow and I don't want to loose the formatting saved in the text flow. Any pointers will be helpful.
Thanks