×

Discussion Board

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

    How to update an application title in S90?

    Hi,

    I am developing a multiview application on S90. I have tried to update the application title dynamically when a new view is displayed without success. It seems like S90 is based on Crystal (S80, a lot of Ckn-classes) and I have taken a look at the compound example for Crystal available here at forum Nokia. In this example the app title is controlled by a CCoeControl derived class using a CCknAppTitle instance . A CCknAppTitle is simply constucted in its ConstructL() and the CCoeControl::ComponentControl(), CCoeControl::CountComponentControls(), and CCoeControl::SetFocus() are updated to handle the CCknAppTitle instance. I have tried to copy this strategy from that example but the title is never updated dynamically after being statically defined in the resource file. One problem/difference between Crystal/S90 could be that the title area is located outside the rectangle returned by CEikAppUi::ClientRect() that is supplied to my class trying to modify the title at construction time.
    I have also noticed that there are some other examples of updating the app title here at forum Nokia, but all of them concern Crystal, and the same startegy used in the Compound example is suggested.

    In S60 the app title is set by the following code snippet:

    CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
    titlePane = (CAknTitlePane*) statusPane->ControlL(
    TUid::Uid(EEikStatusPaneUidTitle));
    titlePane->SetText(_L("The title"));

    A reference to the already existing titlepane is accessed instead of creating a new instance as suggested in the Crystal examples I have found so far. Could this strategy work? If so, what is the corresponding Uid for the title area for S90? I have tried to use KUidHildonStatusPaneTitleArea and EHildonStatusPaneAppNameControl (defined in indicato.hrh) without success.

    If anybody knows how to update the app title dynamically on S90 or has a feeling if I am on the right/wrong way, please let me know.

    Cheers,
    BridgeMan

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    4

    Problem solved

    Hi all,
    I found the answer myself in the Migration guide from Communicator 9200 to S90 available here at Nokia. If anybody cares, here it is.

    It is very simple to update the application title/subtitle dynamically. All you need to do is to
    - include the StatusPaneUtilities.h file
    - link against the ckind.lib
    - add the following code line to your method called when a view is activated:
    StatusPaneUtilities::UpdateStatusPane(StatusPaneUtilities::EItemAppSubname, _L("MyViewName"));

    Forget about the CCknAppTitle class. It is no longer used for this purpose in S90. (I don't know why it hasn't been removed from the S90 platform. If anyone knows what it is good for please let me know. Source/binary compatibility reasons?) The main difference between the title area in S90 compared to S80 is that it is part of the status pane rather than the clent rect area as I guessed. That is why the CCknAppTitle cannot be used anymore.

    /BridgeMan

Posting Permissions

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