Text Layout - Ellipsis the text when exceeds the boundaries of the box.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-label-impl.cpp
index 3f0cf0d..a23eef3 100644 (file)
@@ -426,6 +426,10 @@ void TextLabel::OnInitialize()
   // Use height-for-width negotiation by default
   self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
   self.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::HEIGHT );
+
+  // Enable the text ellipsis.
+  LayoutEngine& engine = mController->GetLayoutEngine();
+  engine.SetTextEllipsisEnabled( true );
 }
 
 void TextLabel::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange change )