Read-only archive of the All About Symbian forum (2001–2013) · About this archive

beginner - CEikLabel

0 replies · 3,765 views · Started 06 October 2004

I have the following code trying to create a CEikLabel. However, it does not
appear on the screen. I only get the CEikEdwin control. How do I make the
label visible? And b t w; why is there no ConstructL() method for CEikLabel
(as there is for CEikEdwin) ?

void CTerminalAppContainer::ConstructL(const TRect& aRect)
{
CreateWindowL();

iMobilNrEdwin = new (ELeave) CEikEdwin;

iMobilNrEdwin->ConstructL(EEikEdwinNoWrap,KDefaultWidth,KDefaultTextLimit,KD
efaultNumberOfLines);
iMobilNrEdwin->SetContainerWindowL( *this );
_LIT(str, "Add tel no here"😉;
iMobilNrEdwin->SetTextL( &str() );

iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL( *this );
iLabel->SetTextL( _L("Example View"😉 );

SetRect(aRect);
ActivateL();
}

Joachim