Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor nishantanindya's Avatar
    Join Date
    Jan 2012
    Posts
    139
    Hello All,
    I want to change the background as well as foreground color of selected item in list box
    I am doing as follows:
    void Ctableview::ConstructL(const TRect& aRect)
    {
    CreateWindowL();
    iItemList = new (ELeave) CAknDoubleLargeStyleListBox();
    iItemList->SetContainerWindowL(*this);
    iItemList->SetMopParent(this);
    iItemList->ConstructL(this);//,EAknListBoxSelectionList);
    iItemList->View()->SetBackColor(TRgb(0,0,0));
    iItemList->View()->ItemDrawer()->SetBackColor(TRgb(0,0,0));
    ((CEikFormattedCellListBox*)iItemList)->ItemDrawer()->SetHighlightedBackColor(TRgb(200,140,20));//orange
    TInt currentFocusItem = iItemList->View()->CurrentItemIndex();
    //GetSelectedItem();
    SetRect(aRect);
    iItemList->MakeVisible(true);
    ActivateL();
    }

    but nothing happen..
    Kindly help me
    Thank you.

  2. #2
    Regular Contributor nishantanindya's Avatar
    Join Date
    Jan 2012
    Posts
    139
    kindly help me:(

  3. #3
    Regular Contributor nishantanindya's Avatar
    Join Date
    Jan 2012
    Posts
    139
    I am able to change the color of text of selected item but i am unable to change background...
    AknsUtils::SetAvkonSkinEnabledL(ETrue); /// first disable the skin
    ((CEikFormattedCellListBox*)iItemList)->ItemDrawer()->SetSkinEnabledL(ETrue);
    ((CEikFormattedCellListBox*)iItemList)->ItemDrawer()->SetBackColor(KRgbYellow);
    ((CEikFormattedCellListBox*)iItemList)->ItemDrawer()->SetHighlightedTextColor(KRgbGreen);
    I am writing this in Draw()
    I dont know how can i do this.
    Kindly help me.

  4. #4
    Regular Contributor nishantanindya's Avatar
    Join Date
    Jan 2012
    Posts
    139
    Now I am able to change colour of text of selected item as well as background....
    in my list box there is icon, title, and date and time
    I want to show them as
    icon, title, D/T.
    kindly help me.

  5. #5
    Regular Contributor nishantanindya's Avatar
    Join Date
    Jan 2012
    Posts
    139
    Can anyone tell me how to do rowspaning in listbox in symbian???

  6. #6
    Regular Contributor nishantanindya's Avatar
    Join Date
    Jan 2012
    Posts
    139
    In emulator background has been changed but not in my device. Why is it happen???

Similar Threads

  1. How to draw background image or change color of default listbox
    By sumanthgwn in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-08-24, 14:03
  2. listbox with no item selected
    By sinhashivam in forum Symbian C++
    Replies: 3
    Last Post: 2008-11-19, 04:02
  3. how to change the color of the Highlight item in the listbox
    By RaveendraB in forum Symbian User Interface
    Replies: 8
    Last Post: 2008-02-28, 17:49
  4. How to change the background color of an item in a list
    By Tejaswini in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-04-23, 11:50
  5. Change color of listbox item
    By anoopd in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-03-09, 08:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved