void CPositionDisplay::MakeVisible(TBool aVisible)
{
   CCoeControl::MakeVisible(aVisible);
   for(TInt i = 0; i < CountComponentControls(); ++i){
      ComponentControl(i)->MakeVisible(aVisible);
   }
}
//Recursively drill down to each control level and step their frame counters.
void CComponentControl::AnimateComponents()
	{
	for (TInt i=0; i<CountComponentControls(); i++)
		{
			CTestRectGc* pComponent = (CTestRectGc*)ComponentControl(i);
			pComponent->NextFrame();	
			if (pComponent->CountComponentControls())				
				((CComponentControl*)pComponent)->AnimateComponents();
		}
	}
//Destroy component controls within this control
CComponentControl::~CComponentControl()
    {
    	while (CountComponentControls())
    	{
    		CCoeControl *pControl;
    		pControl = ComponentControl(0);    		
    		Components().Remove(pControl);  
    		delete pControl;  		
    	}    	
    }
/**
  Sets the size of the component objects based on the present size of the container window.\n
  Calculates the present size of the container control and also the number of component objects.\n
  Sets the component object dimensions accordingly.\n
*/	
void CCtlContainer::SizeChanged() 
	{
	// set the size of the children
	TRect rect = Rect() ;
	TSize size = rect.Size() ;
	TPoint tl = rect.iTl ;
	TInt childCount = CountComponentControls() ;
	if ( childCount > 0 )
		{
		size.iWidth = size.iWidth/childCount ;
		size.iHeight = size.iHeight/childCount ;
		CCoeControl* child ;
		for ( TInt ii = 0; ii < childCount ; ++ii )
			{
			child = ComponentControl( ii ) ;
			child->SetRect( TRect( tl, size ) ) ;
			tl.iX += size.iWidth ;
			tl.iY += size.iHeight ;
			}
		}
	}
// -----------------------------------------------------------------------------
// CTestSettingPage::TestComponentControl
// -----------------------------------------------------------------------------
//
CCoeControl* CTestSettingPage::TestComponentControl(TInt anIndex) const
    {
    return ComponentControl( anIndex );
    }
// -----------------------------------------------------------------------------
// CTestTitlePane::DoComponentControl
// -----------------------------------------------------------------------------
//
CCoeControl* CTestTitlePane::DoComponentControl( TInt aIndex ) 
    {
    CCoeControl* componentControl = NULL;
    componentControl = ComponentControl( aIndex );
    return componentControl;
    }