Label does not appear on the screen using CEikLabel

Login to reply to this topic.
Thu, 2007-08-02 10:53
Joined: 2007-07-31
Forum posts: 135

hi,
I have the following code trying to create a CEikLabel. However, it does not
appear on the screen. 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();
iLabel = new (ELeave) CEikLabel;
iLabel->SetContainerWindowL( *this );
iLabel->SetTextL( _L("Example View") );

SetRect(aRect);
ActivateL();
}

I shall be thankfull for your help....


Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++


Thu, 2007-08-02 11:18
Joined: 2004-05-21
Forum posts: 285
Re: Problem in displaying Label

Add iLabeliLabel1->ActivateL()

Cheers,
Sri

Thu, 2007-08-02 12:53
Joined: 2007-07-31
Forum posts: 135
Re: Label does not appear on the screen using CEikLabel

hi Mr. srikant thank you very much for your help

but this code iLabeliLabel1->ActivateL() did not work.

Brajesh...


Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++

Thu, 2007-08-02 13:00
Joined: 2006-04-19
Forum posts: 134
Re: Label does not appear on the screen using CEikLabel

Check your these methods

ComponentControl(TInt aIndex) const should be (case 0: return iLabel;)

CountComponentControls() const should be (return 1)

SizeChanged() should be iLabel->SetExtent( TPoint(110,5), iLabel->MinimumSize() );

May it'll help you as mine code is same as yours and its running properly.

BR
Isha


"To the question of your life , you are the only Answer. To the problems of your life,you are the only Solution".

Thu, 2007-08-02 13:41
Joined: 2007-07-31
Forum posts: 135
Re: Label does not appear on the screen using CEikLabel

Thank you very much Isha for the help..
my problem has been solved by your help... Smiling


Life is too short ! so do as many good things as you can do...
Brajesh Kumar...
Beginner in Symbian C++

  • Login to reply to this topic.