+ if(enable)
+ {
+ if(!mScrollBar)
+ {
+ Toolkit::ImageView indicator = Toolkit::ImageView::New();
+ indicator.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+ indicator.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ indicator.SetStyleName("TextSelectionScrollIndicator");
+
+ mScrollBar = Toolkit::ScrollBar::New(Toolkit::ScrollBar::HORIZONTAL);
+ mScrollBar.SetProperty(Dali::Actor::Property::NAME, "Text popup scroll bar");
+ mScrollBar.SetStyleName("TextSelectionScrollBar");
+ mScrollBar.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT);
+ mScrollBar.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+ mScrollBar.SetProperty(Actor::Property::POSITION, Vector2(mScrollBarPadding.x, -mScrollBarPadding.y));
+ mScrollBar.SetResizePolicy(Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH);
+ mScrollBar.SetProperty(Actor::Property::ORIENTATION, Quaternion(Quaternion(Radian(1.5f * Math::PI), Vector3::ZAXIS)));
+ mScrollBar.SetScrollIndicator(indicator);
+ mScrollBar.GetPanGestureDetector().DetachAll();
+ mScrollView.Add(mScrollBar);
+ }
+ }
+ else
+ {
+ UnparentAndReset(mScrollBar);
+ }