Merge "Added TextLabel and TextField tests" into tizen
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-field-impl.cpp
index 390cb89..f17ea34 100644 (file)
@@ -403,6 +403,8 @@ Property::Value TextField::GetProperty( BaseObject* object, Property::Index inde
 
 void TextField::OnInitialize()
 {
+  Actor self = Self();
+
   mController = Text::Controller::New( *this );
 
   mDecorator = Text::Decorator::New( *this, *mController );
@@ -422,6 +424,10 @@ void TextField::OnInitialize()
     Vector2 stageSize = Dali::Stage::GetCurrent().GetSize();
     mDecorator->SetBoundingBox( Rect<int>( 0.0f, 0.0f, stageSize.width, stageSize.height ) );
   }
+
+  // Fill-parent area by default
+  self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
+  self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
 }
 
 void TextField::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange change )
@@ -439,7 +445,7 @@ float TextField::GetHeightForWidth( float width )
   return mController->GetHeightForWidth( width );
 }
 
-void TextField::OnRelayout( const Vector2& size, ActorSizeContainer& container )
+void TextField::OnRelayout( const Vector2& size, RelayoutContainer& container )
 {
   if( mController->Relayout( size ) ||
       !mRenderer )