Hi,
it is very simple and additionally if it will be good programmed it could be used on both UIQ and Avkon ( and Crystal possible:). Remember that the UIQ additionally needs processing pointer events - but is is much nore simply than keyboard.
You must do 3 steps
a) provide model - means implement mixin MListBoxModel
b) programm drawer - derived from CListItemDrawer
c) program listbox class - derived from CEikListBox
It is really simply, I cannot put source code here, so look at least on this header file and implement all methods:
// ---------------------------------------------------------
// MODEL
// Encapsulates the data items for the listbox
// It just wraps access to the view's list of objects
// ---------------------------------------------------------
class CExampleListBoxModel: public MListBoxModel
{
public:
///
/// C++ constructor.
///
CExampleListBoxModel();
///
/// MListBoxModel - Gets the number of items in the list box.
///
TInt NumberOfItems() const;
///
/// MListBoxModel - Gets an array of strings used by the list box
///
const MDesCArray* MatchableTextArray() const;
///
/// MListBoxModel - Returns pointer to text item array from model
///
MDesCArray* ItemTextArray() const;
///
/// set new MListBoxModel
///
void SetItemTextArrayL( MDesCArray* aItems );
private:
///
/// Defined as pure virtual for future use - must have blank
/// implementation...
///
virtual TAny* Reserved_1() { return NULL; };
private:
/// text description storage
CDesCArray* iTexts;
};
// ---------------------------------------------------------
// DRAWER
// draws images in listbox
// ---------------------------------------------------------
class CExampleListBoxItemDrawer: public CListItemDrawer
{
public:
///
/// C++ constructor.
///
CExampleListBoxItemDrawer();