Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 14:35, 7 May 2008.

Ensuring Scroll Bar Background is drawn properly

From Forum Nokia Wiki

Overview:

Platform(s): S60 3rd Edition, S60 3rd Edition, FP1

When drawing a control (list box, grid, editor, etc.) that uses a scroll bar, the background of the scroll bar may remain white. This happens when a container does not pass the correct object (context-specific skin parameters) to its child controls. Proper skinning for child controls can be can be enabled by implementing the CCoeControl::MopSupplyObject() method for the container class, and making sure that the object provider chain between controls and their parents is set up correctly.

For more information, see SDK documentation on [MObjectProvider][1] and [CCoeControl::SetMopParent()][2]

Solution:

To correctly draw scroll bar backgrounds:

First, add the following code to the constructor of the view class derived from CCoeControl:

// make this as member variable
   CAknsBasicBackgroundControlContext*  iSkinContext; 
  
   iSkinContext =AknsBasicBackgroundControlContext::NewL(
            KAknsIIDQsnBgAreaMainAppsGrid,
            iAvkonAppUi->ApplicationRect(),
            EFalse );

Note: When using the 'KAknsIIDQsnBgAreaMainAppsGrid' skinID, provide the application (full screen) rect as above. Then, implement MopSupplyObject() as follows:

TTypeUid::Ptr CMyCustomGridAppView::MopSupplyObject( TTypeUid aId )
       {
        if( aId.iUid == MAknsControlContext::ETypeId && iSkinContext != NULL )
           {
           return MAknsControlContext::SupplyMopObject( aId, iSkinContext );
           }     
        return CCoeControl::MopSupplyObject( aId );
       }
Related Discussions
Thread Thread Starter Forum Replies Last Post
list box in view Nokia_Archive Symbian User Interface 2 2003-07-15 05:21
Problem in ListBox.Yucca..Help!!! Priju Jacob Paul General Symbian C++ 0 2006-02-08 08:59
Application icons on the status bar RT22 General Symbian C++ 2 2008-06-03 12:58
List box dispalys only one item!! Nokia_Archive Symbian User Interface 3 2002-09-11 13:42
CEikColumnListBox size ahti123 Symbian User Interface 0 2005-12-22 09:05
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX