×
Namespaces

Variants
Actions
Revision as of 08:55, 18 September 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:Listbox for Symbian Web Runtime

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.


Article Metadata
Code Example
Source file: Media:Listbox.zip
Compatibility
Platform(s): S60 3rd Edition, FP2
S60 3rd Edition FP2
Article
Created: copyeditor (08 Apr 2008)
Last edited: hamishwillee (18 Sep 2012)

Contents

Purpose

This example Javascript code is intended for re-use and incorporation into larger projects.

Overview

ListBox is a graphical user interface library, written in JavaScript language and designed for the S60 Web Runtime platform. The library can be used mainly in Web widgets for S60 to display text information on a list view.

ListBox is controlled by the “keypress” event of the five-way navigation key (on S60 devices). Therefore, it requires the browsing mode of a widget to be set to “tabbed” mode (vs. “cursor” mode). ListBox, however, does not enforce this requirement automatically. Widgets which use the library will need to set the browsing mode accordingly. This gives the widgets a chance to mixed-use ListBox and other UI components that may require the “cursor” mode.

List view demo.jpg

Public methods

 Constructor ListBox (Element [div] viewElement,
                      Integer maxVisibleLen,
                      Boolean sort)
 
 Void activateListBox ()
 
 Void deactivateListBox ()
 
 Void releaseResources ()
 
 Void setMaxVisible (Integer maxVisibleLen)
 
 Void setDisplayStyle (String unselectedStyle, String selectedStyle)
 
 String getSelectedItem ()
 
 Void addItem (String item)
 
 Void createList (Array newItems)
 
 Void removeItem ()
 
 Void filter (String argument)
 
 Callback function onRightNaviKeyPress()
 
 Callback function onLeftNaviKeyPress()
 
 Callback function onCenterNaviKeyPress ()
 
 Callback function onItemSelected ()


Example application

File:Listbox.zip

This page was last modified on 18 September 2012, at 08:55.
63 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×