Dimming a Listbox item

Login to reply to this topic.
Wed, 2008-01-30 14:25
Joined: 2006-02-21
Forum posts: 66

Hi All,

I have a list box inside a dialog. I need to dim a particular item in the list box. I used the following code

CListDialog* ListingDialog = CListDialog::NewL();
ListingDialog->PrepareLC(R_LISTING_DLG);
ListingDialog->SetObserver(this);
CAknSingleStyleListBox* listBox = (CAknSingleStyleListBox*) ListingDialog->Control(ESelectionListControl);

listBox->ItemDrawer()->ClearAllPropertiesL();
TListItemProperties listProps = TListItemProperties();
listProps.SetItalics(ETrue);
listProps.SetBold(ETrue);
listProps.SetUnderlined(ETrue);
listProps.SetDimmed(ETrue);
listProps.SetColor(KRgbYellow);
listBox->ItemDrawer()->SetPropertiesL(TInt(1), listProps);
listBox->ItemDrawer()->SetFont(LatinPlain12());
listBox->ItemDrawer()->ColumnData()->SetColumnFontL(TInt(1), LatinPlain12());
listBox->SetSelectionIndexesL(iMarkedItems);
ListingDialog->RunLD();

but only underline is getting refleted others are just getting ignored. Did some one face the same problem. Please help me out.

Regards,
Sathish S

  • Login to reply to this topic.