Categories: How To | Flash Lite | Code Examples | UI
This page was last modified 18:36, 2 October 2007.
How to make an input text field
From Forum Nokia Wiki
Compatibility: Flash Lite: 1.1, 2.x
Making a simple text field
- Using the Text tool, drag a text field.
- In Properties tab, select Input Text and fill the Var field to link it to a variable. (myText in this example).
- To edit a text field, users must first give an input text field focus, and then press their device's select key. By default, a yellow rectangle will be drawn around the input text field that has focus .
- When a user edit a text field, the linked variable (myText here) will contain this value.
Custom input text
- Numerical input field
You can make an input text field allowing numbers only by executing this code:
fscommand2("SetInputTextType", "myText", "Numeric");
- Set maximum characters allowed
Select you text field, then fill the Maximum characters in the Properties tab.
- Sets the color of the focus rectangle (Flash Lite 2.x only)
You can change the color of the focus rectangle (yellow by default) by using the following statement:
fscommand2("SetFocusRectColor", 255, 153, 0); //Orange
To reset the color of the focus rectangle:
fscommand2("SetFocusRectColor", <red>, <green>, <blue>);
Download
You can download an example with source code here:
Input Text 240*320 (swf + fla)
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to set field length of appuifw.query(,"number")? | jfml | Python | 14 | 2007-05-21 20:14 |
| Weird behaviour Text component in dictionary mode | bercobeute | Python | 1 | 2006-01-10 20:30 |
| Issue with links to anchor in the CBrCtlInterface Browser Control of S60 3rd FP1 | manasi_d | Symbian Networking & Messaging | 16 | 2008-04-10 12:45 |
| Simple UI Questions | bmichel | Python | 2 | 2008-05-03 02:47 |
| Does appuifw.Text input support normal text? | bercobeute | Python | 2 | 2006-02-22 08:43 |
