×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    38

    Context pane Icon not visible over the navi pane??

    hi,

    I am facing a strange problem with context pane icon..

    i have created an mbm file with an icon when am loading that icon on the context pane using the following code ..

    CAknContextPane* iContextPane = (CAknContextPane *)sp->ControlL(TUid::Uid(EEikStatusPaneUidContext));

    iContextPane->SetPicture(lBitmap,lBitmapM);

    but it appears as though its behind the navipane[not in front]

    but if i load this mbm in the aif icon builder and save the mbm gain then its appearing properly..

    i cant understand the reason why its happening,

    could any one please tell me how to get it without loading the mbm in the Aif icon builder

    all the default icons provided by symbian [eg those in avkon.mbg]
    appear properly...


    Please give me some suggestions on how to do it


    Thanks

    Varsha.

  2. #2
    Registered User
    Join Date
    Jun 2006
    Posts
    31

    Re: Context pane Icon not visible over the navi pane??

    soln using svg.



    .....................................................................................................


    // setup the context pane
    .........................................................................................................

    void SetupStatusContext PaneL()
    {

    TUid contextPaneUid = TUid::Uid( EEikStatusPaneUidContext );
    CEikStatusPaneBase::TPaneCapabilities subPaneContext = StatusPane()->PaneCapabilities( contextPaneUid );
    if ( subPaneContext.IsPresent() && subPaneContext.IsAppOwned() )
    {
    CAknContextPane* context1 = static_cast< CAknContextPane* > (
    StatusPane()->ControlL( contextPaneUid ) );
    TResourceReader reader;
    iCoeEnv->CreateResourceReaderLC( reader, R_NAVI_TAB_CONTAINER_CONTEXT1_RESOURCE );
    context1->SetFromResourceL( reader );
    CleanupStack::PopAndDestroy();
    }
    }


    ......................
    .rrsi

    ......................

    RESOURCE CONTEXT_PANE r_art_container_context1_resource
    {
    bmpfile = qtn_loc_resource_file_10;
    bmpid = EMbmNavitab_aifNewskyscape_logo;
    bmpmask = EMbmNavitab_aifNewskyscape_logo_mask;
    }


    ......................
    .|01

    ......................

    #define qtn_loc_resource_file_10 "\\resource\\apps\\Navitab_aif.mif";

    ......................
    .hrh

    ......................
    enum TMifNavitab_aif
    {
    EMbmNavitab_aifNewskyscape_logo = 16384,
    EMbmNavitab_aifNewskyscape_logo_mask = 16385,
    EMbmNavitab_aifLastElement
    };
    Last edited by chaudhari_hanuman; 2006-12-15 at 10:32.

  3. #3
    Registered User
    Join Date
    Jun 2006
    Posts
    31

    Re: Context pane Icon not visible over the navi pane??

    -------------------------------------
    FOR SETTING TITLE pane in status pane
    ................................................



    HBufC* title = HBufC::NewL(100);

    ...................................................................................................................................


    SetTitle(title);

    ...................................................................................................................................



    void CBrCtlSampleAppContainer::SetTitle(const TDesC& title)
    {
    MEikAppUiFactory *appUiFactory;
    appUiFactory = iEikonEnv->AppUiFactory();
    CAknTitlePane* titlePane = static_cast<CAknTitlePane*>(appUiFactory->StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
    titlePane->SetTextL(title);

    }

    OR






    ................................................................................
    // setup the title pane

    ...............................................................................



    void CNaviTabContainerView::SetupStatusTitlePaneL()
    {

    TUid titlePaneUid = TUid::Uid( EEikStatusPaneUidTitle );
    CEikStatusPaneBase::TPaneCapabilities subPaneTitle =
    StatusPane()->PaneCapabilities( titlePaneUid );
    if ( subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned() )
    {
    CAknTitlePane* title = static_cast< CAknTitlePane* >(
    StatusPane()->ControlL( titlePaneUid ) );
    TResourceReader reader;
    iEikonEnv->CreateResourceReaderLC( reader, R_ART_CONTAINER_TITLE_RESOURCE );
    title->SetFromResourceL( reader );
    CleanupStack::PopAndDestroy();
    }
    }

    ......................
    .rrsi

    ......................


    RESOURCE STATUS_PANE_APP_MODEL r_art_container_status_pane
    {
    panes =
    {
    SPANE_PANE
    {
    id = EEikStatusPaneUidTitle;
    type = EAknCtTitlePane;
    resource = r_art_container_title_resource;
    },
    SPANE_PANE
    {
    id = EEikStatusPaneUidContext;
    type = EAknCtContextPane;
    resource = r_art_container_context1_resource;
    }

    };
    }
    RESOURCE TITLE_PANE r_art_container_title_resource;
    {
    txt = STR_NaviTabContainerView_1;
    }

    ......................
    .|01

    ......................


    #define STR_NaviTabContainerView_1 "Titles"

  4. #4
    Registered User
    Join Date
    Feb 2008
    Posts
    4

    Question Re: Context pane Icon not visible over the navi pane??

    Hi,

    I am experiencing a similiar issue:
    sometimes, a dynamically loaded icon is not visible in the context pane. Actually, it happens every second time I am loading it into the context pane.

    In my application, the view has 2 layouts:
    - R_AVKON_STATUS_PANE_LAYOUT_SMALL - used as a default one
    - R_AVKON_STATUS_PANE_LAYOUT_USUAL - only when executing a form

    I switch to R_AVKON_STATUS_PANE_LAYOUT_USUAL as follows:
    AppUi()->StatusPane()->SwitchLayout();
    sp->ApplyCurrentSettingsL();
    .
    Then, I am setting the title pane:
    TUid titlePaneUid;
    titlePaneUid.iUid = EEikStatusPaneUidTitle;

    CEikStatusPaneBase::TPaneCapabilities subPane = sp->PaneCapabilities(titlePaneUid);

    if (subPane.IsPresent() && subPane.IsAppOwned())
    {
    CAknTitlePane* TitlePane = STATIC_CAST(CAknTitlePane*,
    sp->ControlL(titlePaneUid) );
    if (TitlePane)
    {
    HBufC* titleText = StringLoader::LoadLC(aResourceId);
    TitlePane->SetTextL(*titleText);
    CleanupStack::PopAndDestroy();
    }
    }

    Next, I set the context pane icon:

    TUid contextPaneUid;
    contextPaneUid.iUid = EEikStatusPaneUidContext;

    CEikStatusPaneBase::TPaneCapabilities subPane1 = sp->PaneCapabilities(contextPaneUid);

    if (subPane1.IsPresent() && subPane1.IsAppOwned())
    {
    CAknContextPane* contextPane =
    static_cast< CAknContextPane* >(sp->ControlL(contextPaneUid));

    if(contextPane)
    {
    CFbsBitmap* icon = NULL;
    CFbsBitmap* mask = NULL;

    AknIconUtils::CreateIconLC( icon, mask, *iIconPath,
    EMbmTestDialog, EMbmTestDialog_mask);
    CleanupStack::Pop(2);
    contextPane->SetPicture( icon, mask );
    }

    sp->ApplyCurrentSettingsL();
    sp->DrawNow();


    In RESOURCE file, I have defined a status pane with title and context pane.

    What could be a reason for this odd behaviour? The icon appears only every second time I am loading it into the context pane.


    Thanks in advance for any hints.

    Cheers,
    Aga

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×