Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 02:53, 30 May 2013 by hamishwillee (Talk | contribs)

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

How to change font of specific item in a listbox

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia E90
CompatibilityPlatform Security
Capabilities: )
Article
Keywords: CEikColumnListBox, CAknColumnListBox, CColumnListBoxData, CFormattedCellListBoxData.
Created: vasant21 (18 Oct 2008)
Last edited: hamishwillee (30 May 2013)

Contents

Overview

This snippet shows how to change the font of specific item in a Listbox, Listbox font can be changed using CColumnListBoxData or CFormattedCellListBoxData as they handle data layout of the listbox items.

This snippet can be self-signed.

Preconditions

Here we assume that we already have a working code for listbox.


MMP file

The following capabilities and libraries are required:

CAPABILITY  None
 
LIBRARY avkon.lib
LIBRARY eikcoctl.lib
LIBRARY eikctl.lib


Listbox using CFormattedCellListBoxData for handling data

#include <eikfrlbd.h> 
 
 
CFormattedCellListBoxData* columnData = iListBox->ItemDrawer()->FormattedCellData();
// aIndex - index of item to be changed.
columnData->SetSubCellFontL( aIndex, LatinPlain12());

Listbox using CColumnListBoxData for handling data

#include <eikclbd.h> 
 
 
CColumnListBoxData* columnData = iListBox->ItemDrawer()->ColumnData();
// aIndex - index of item to be changed.
columnData->SetColumnFontL( aIndex, LatinBold12());


Postconditions

Font of the item specified with aIndex will be changed.

This page was last modified on 30 May 2013, at 02:53.
45 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.

×