DoubleStyle Image Listbox Package
27 Jul 2004 - 21:55

dslb1.pngPackage : DoubleStyle Image Listbox

Platform : UIQ 2.1

Author : Sanket Lopez

Purpose : The UIQ platform has a dearth of ListBox types as compared to the Series60 Platform. The included binaries provide support for ListBox's which supports two lines of text and an optional image per row.

Change Log

-  12-01-2004 - Release V 1.0
Initial.

-  23-01-2004 - Release V 1.1
Added Support for Jog-Dial.Documentation Updates & Fixes.

-  26-07-2004 - Release V 1.2
Better Example Code.

Package

ReleasePackage_v1.2.zip
ReleasePackage_v1.2.zip

Installation

Unzip the archive to any folder and make sure the directory structure is maintained.

-  ARMI : Copy the DBSTLIMGLB.LIB and DBSTLIMGLB.DLL from the ARMI folder to your UIQ SDK's \epoc32\release\armi\urel folder. Copy the header file DBSTLIMGLB.H to your \epoc32\include folder.

-  WINSCW : Copy the DBSTLIMGLB.LIB and DBSTLIMGLB.DLL from the WINSCW folder to your UIQ SDK's \epoc32\release\winscw\udeb folder. Copy the header file DBSTLIMGLB.H to your \epoc32\include folder.

SIS File Creation

Add the DBSTLIMGLB.DLL to your package file (PKG) so it is copied to the install directory of your application.

An example would be :

"C:\Symbian\UIQ_70\epoc32\release\armi\urel\dbstlimglb.dll" - "!:\system\apps\Simple\dbstlimglb.dll"

Usage

Include the header file in your source and link against DBSTLIMGLB.LIB. The CDoubleStyleColumnListBox is created and used in the same manner as a normal CEikListBox.

To complete the construction, two more functions must be called,
-  Firstly, the fonts for Line 1 and Line 2 of the text. To set these fonts, call the SetOwnFonts(const CFont* aFontOne, const Cfont* aFontTwo) which is in the Item Drawer. For example,

iMyListBox->ItemDrawer()->SetOwnFonts(iLine1Font, iLine2Font);

-  Secondly, the Parent View has to be initialized. Use the SetParentView() method for the same. For example,

iMyListBox->ItemDrawer()->SetParentView(iMyListBox->View());

The above two steps should be done before activating the ListBox. All other construction steps are similar to the CEikListBox.

To add an element to the Listbox, get the Listbox ItemArray and keep appending elements to it. A '\n' character (NewLine) in the string will take you to the Second line however another '\n' char in the same column will have no effect. A '\t' (TAB) character will go to next column provided the column has already been set while constructing the Listbox.

Jog Implementation

There are no problems for using the JOG-DIAL in your list box; DoubleStyleColumnListbox makes jog implementation as easy as two steps,

-  Firstly, while constructing the listbox give a call to the function EnableJog().
Declaration:

void EnableJog(TBool aValue =ETrue);

-  Secondly, as the Application UI will catch all the keys we need to implement a function HandleKeyEventL() in AppUi. In this function we need to pass the aKeyEvent to Listbox's internal function HangleJogEvents().
Declaration:

TKeyResponse HangleJogEvents(const TKeyEvent& aKeyEvent);

Example Code will take the form shown below :-

        TKeyResponse CSimpleAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
{
        TKeyResponse ret = EKeyWasNotConsumed;
        ret =  iMyView->iMyListBox->HangleJogEvents(aKeyEvent);
        return ret;
}

Example

An Example is Provided in the "TestApp" directory, to show the usage of the Dll.

Support

<center><Font color="green"> support@arisetech.net</Font></center>

Download posted July 27th, 2004 by arisetech

Submitted by Anonymous on Fri, 2004-05-21 12:06.

Hi!!! I have some problems with your library. During the build of CDoubleColumnListBox, the ConstructL() makes an ecception. I have seen that your library has developed with CodeWarriors, while I have used VisualC++. Is it the problem? If not, what is the problem? Thank you Emanuele

Submitted by Arise Technologies (not verified) on Wed, 2004-06-09 16:27.

Yes our utility has been developed with CW and tested only on UIQ 2.0 (SE P800).

If you can email a detailed description of the problem including compiler/ide, target device, SDK version, error messages, etc. to support@arisetech.net then we will look in to the problem and probably even give you the source.

Regards, Arise Technologies


Submitted by Anonymous on Thu, 2004-07-29 15:09.

Please download the latest archive, this has better examples.

For further clarifications please email support@arisetech.net with subject as "listbox"

Regards, Arise Technologies


Submitted by Anonymous on Wed, 2004-08-25 16:42.

I have tried this example in UIQ2.1

Platform for Borland C++. I think armi

libraries are working fine. but i think wins

udeb library is need to see the output in

emulator. Is there any winscw udeb to

wins udeb converted library(DLL and LIB)

available or any other way to compile

and see it in wins udeb emulator for UIQ

2.1 platform.

thans in advance.


Submitted by Anonymous on Thu, 2004-08-26 06:56.

Hi

Actually we have compiled this library on UIQ SDK for CW. So the Libirary only supports winscw. What is needed is a compilation of the Library on wins so that it can be used on VC6 and Borland IDE.

We will be looking into this, and soon will come up with a solution.

Regards.

Sanket Lopez.

For Arise Technologies.


Submitted by ash (not verified) on Mon, 2004-07-26 14:04.

Hi, I tried running your code on UIQ 2.1 and the IDE is codewarrior, the icons do not appear though. When i remove the comments to be able to draw the icons,the program crashes. Can you please help? thx


copyright 2003-2009 NewLC SARL