Symbian
Symbian OS Library

FAQ-0756 Why am I unable to change the font in a column of my CColumnListBoxData?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: EIKON
Created: 12/06/2001 Modified: 01/17/2002
Number: FAQ-0756
Platform: Symbian OS v6.0

Question:
I have tried to change the font in a column of my CColumnListBoxData with the SetColumnFontL(TInt aColumn,const CFont* aFont) method. But nothing happens. What might I be doing wrong?

Answer:
This is a Crystal-specific issue. If you look at the definition of CColumnListBoxData in eiklbd.h and compare it with the versions in other Symbian OS v6.x SDKs (Quartz 6.1 or Series 60), you will see that it defines, inter alia, an additional private flag
    enum TFlags
    {
    EUseColumnFontsDirectly=0x0001
    };

    and an additional public method
    IMPORT_C void SetUsesColumnFontsDirectly();

    The result of calling the method is to set the flag, which is tested when an attempt is made to change the font with SetColumnFontL(...). The newly specified font is ignored if the flag is not set. There is no way subsequently to unset the flag.

    The work around is therefore, when developing for Crystal, to call SetUsesColumnFontsDirectly() before calling SetColumnFontL(...).