×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    113

    create custom Label in container view dynamically...

    Dear Sir.

    I want to create a Label in container view dynamically. I am using Ceiklabel class for same but its not draw on container.
    Please see my code below-
    Code:
    void CCalenderTestContainer::CreateLabel()
    	{
    	// for create label
    	iLabel = new (ELeave) CEikLabel;
    	iLabel->SetContainerWindowL(*this);
    	iLabel->SetTextL(_L("Current Date"));	
    	DrawNow();
    	}
    void CCalenderTestContainer::SizeChanged()
    	{
    	CCoeControl::SizeChanged();
    	LayoutControls();
    
    	//iListBox->SetExtent(TPoint(0,40), TSize(Size().iWidth, Size().iHeight));
    	iLabel->SetExtent(TPoint(Size().iWidth / 2, 20), TSize(80, 30));  // for position of label
    	DrawNow();
    	}
    when ever i call CreateLabel() function. its not draw.... so please suggest how to create label dynamically.
    thanx in advance!!!

    Regards,
    satish

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: create custom Label in container view dynamically...

    note that you should return the number of the controls inside the container in the CountComponentControls function, and you should also return the controls when requested. Also note that if controls are overlapping, the latest controls you are giving out are getting also drawn latest, so they will be drawn on top the previously drawn controls.

Similar Threads

  1. Replies: 2
    Last Post: 2011-05-18, 00:19
  2. Replies: 3
    Last Post: 2010-08-21, 19:59
  3. Replies: 14
    Last Post: 2009-06-16, 08:25
  4. Create Label controls dynamically?
    By djoseph1 in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-07-11, 14:50

Posting Permissions

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