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 :?
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