Methods and properties of the Widget object are used to control basic properties for any UI items. It is not possible to construct a Widget object directly, but all UI classes and onscreen items inherit their basic functionality from this Widget base class.
Removes softkey assignments for the widget.
Assigns a value to the specified widget property and returns the widget. This function can be used to chain multiple property assignments.
Sets the label and (optionally) handler for a specific softkey when this widget has keyboard focus.
Sets an image object to display at the top left corner of the softkey. Useful for indicating a hard key that calls the same handler. Suggested image size is 5x5 pixels.
Sets up multiple softkeys at once. Assigning more than four softKeys causes the fourth softkey to be a More softkey, which cycles the other three softkeys through the list.
Jumps to a specific page of softKeys (starting with 1), after calling setSoftkeysByList.
Gives the selected widget keyboard focus. Calling this method triggers the object's onFocus handler to be called, which must return true to take focus.
Sets the type of box that is drawn around the widget.
Value for the background color
Value for the foreground color of all widgets except Input fields
Value for the foreground color of Input fields
For D40, D45, D50 and D70 model phones: white or black.
For D60, D62, D65 model phones:
Whether or not the widget is able to receive keyboard focus.
Function to execute when the widget loses keyboard focus.
Function to execute when the widget is targeted for keyboard focus. This function must return true for the widget to actually gain keyboard focus.
|onhide||Function to execute when the widget is hidden. (typically used to ensure Input field highlight colors are set to their normal background color when a screen is exited or hidden).|
Handler for when the key specified by [key] is pressed. Key handlers start by checking on the current focused widget. If none are found, they will move up the UI chain to any parent widgets.
Set an event handler for one of the four softkeys. Replace [key] with the corresponding value of 1 - 4 (left to right).
Whether or not the widget is displayed.
Width/height of the widget.
Position of top left corner of the widget.