+ // Create a label for the color selection button.
+ // The button will be a child of this, so as to be placed next to it.
+ TextLabel colorLabel = TextLabel::New( "Text Color: " );
+ colorLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::WIDTH );
+ colorLabel.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
+ colorLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
+
+ // Create a container for the color button, to layout the drop-down list below it.
+ mColorContainer = Control::New();
+ mColorContainer.SetResizePolicy( ResizePolicy::DIMENSION_DEPENDENCY, Dimension::WIDTH );
+ mColorContainer.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::HEIGHT );
+ mColorContainer.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.0f, BUTTON_PERCENTAGE, 0.0f ) );
+
+ // Place to right of parent.
+ mColorContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_RIGHT );
+ mColorContainer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
+ colorLabel.Add( mColorContainer );
+
+ // Add border to highlight harder-to-see colors.
+ // We use a color rather than border visual as the container will always be behind the button.
+ Property::Map colorMap;
+ colorMap.Insert( Toolkit::Visual::Property::TYPE, Visual::COLOR);
+ colorMap.Insert( ColorVisual::Property::MIX_COLOR, Color::BLACK );
+ mColorContainer.SetProperty( Control::Property::BACKGROUND, colorMap );
+