Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

How to change wait note text at runtime

From Wiki
Jump to: navigation, search
Article Metadata
Article
Created: rathodavinash (28 Jun 2007)
Last edited: hamishwillee (20 Oct 2011)
Many a times it is needed to show updates on wait notes. This can be achieved with the following:


The resource file

RESOURCE DIALOG r_waitnote
{
flags = EAknWaitNoteFlags;
buttons = R_AVKON_SOFTKEYS_CANCEL;
items =
{
DLG_LINE
{
type = EAknCtNote;
id = EGeneralNote;
control = AVKON_NOTE
{
layout = EWaitLayout;
singular_label = "Receiving File  : %d Bytes";
plural_label ="%d %% Recieved";
imagefile = "z:\\system\data\avkon.mbm";
imageid = EMbmAvkonQgn_note_progress;
imagemask = EMbmAvkonQgn_note_progress_mask;
animation = R_QGN_GRAF_WAIT_BAR_ANIM;
};
}
};
}

Here singular_label is what will be shown as soon as the dialog is executed. To change the label CAknWaitNotes SetTextL function is used.

C++ Code

  • Create and Execute the dialog
iDlg = new(ELeave)CAknWaitDialog( (REINTERPRET_CAST(CEikDialog**,&iDlg))); 
iDlg->SetTone( CAknNoteDialog::EConfirmationTone );
iDlg->SetCallback( this );
iDlg->SetTextL(_L("Please Wait..."));
iDlg->ExecuteLD(R_WAITNOTE);
  • Change label as and when required
_LIT(KFormat,"%d %% Recieved");
str.Format(KFormat,kb);
iDlg->SetTextL(str);
  • Dismiss the dialog
if(iDlg)
{
iDlg->ProcessFinishedL();
iDlg = NULL;
}
This page was last modified on 20 October 2011, at 01:15.
39 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×