×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2007
    Posts
    7

    how to create a dialog with caption labels right-aligned and controls left-aligned

    In the nokia application "Synchronization", you can see the synchronization log is a dialog, on which the caption labels right-aligned and controls left-aligned.
    This style of dialog is implemented in UIQ but NOT in S60.
    So how to create such a dialog in S60?

    I have tried many ways, but they are not ideal: :-(
    0. CAknDialog/CEikDialog. Cannot set the caption labels right aligned. Who can tell me if some api will do so? :?
    1. CAknQueryMessage. But letters are not fixed in width. What's more, unicode character is not all of the same width. :x
    2. wmlc. But table in wml is divided in to cells of equal width. :x
    3. CAknForm. But cannot set EDWIN control multilines in view mode even i've set all mutiline-relative parameters. And an unnecessary highlighted bar is shown! :x

    What on earth the nokia application can do so :?

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475

    Re: how to create a dialog with caption labels right-aligned and controls left-aligned

    Well, they probably use the CAknSingleHeadingPopupMenuStyleListBox, like this:

    void CAknExPopListView::ShowSingleItemPopupListL( TBool aShowTitle )
    {

    CAknSingleHeadingPopupMenuStyleListBox* listBox = new (ELeave) CAknSingleHeadingPopupMenuStyleListBox;
    CleanupStack::PushL(listBox);

    CAknPopupList* popupList = CAknPopupList::NewL(listBox, R_AVKON_SOFTKEYS_OK_EMPTY, AknPopupLayouts::EMenuWindow );
    CleanupStack::PushL(popupList);

    listBox->ConstructL(popupList, EAknListBoxViewerFlags);

    CDesCArray* array = (CDesCArray*) listBox->Model()->ItemTextArray();
    listBox->CreateScrollBarFrameL(ETrue);
    listBox->ScrollBarFrame()-> SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
    // Fill the popuplist
    array ->Reset();
    TBuf<42> Boff;

    Boff.Zero();
    Boff.Append(_L("Forum")); //heading
    Boff.Append(_L("\t")); // Tab
    Boff.Append(_L("Nokia"));
    array->AppendL(Boff);
    Boff.Zero();
    Boff.Append(_L("(V)")); //heading
    Boff.Append(_L("\t")); // Tab
    Boff.Append(_L("A Denevér"));

    array->AppendL(Boff);

    TBuf<KMaxTitleLength> title;
    iCoeEnv->ReadResource( title, R_AKNEXPOPLIST_MENU_TITLE_TEST1 );
    popupList->SetTitleL( title );

    popupList->ExecuteLD();

    CleanupStack::Pop(popupList);
    CleanupStack::PopAndDestroy(listBox);

    }

    Let me know, how you like it,
    (V) - A Denevér

Posting Permissions

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