+
+ for( unsigned int i = 0; i < ALIGNMENT_TABLE_COUNT; ++i )
+ {
+ Toolkit::RadioButton alignButton = Toolkit::RadioButton::New( ALIGNMENT_TABLE[ i ] );
+ alignButton.ClickedSignal().Connect( this, &TextScrollingExample::OnAlignButtonClicked );
+ alignButton.SetProperty( Dali::Actor::Property::NAME, ALIGNMENT_TABLE[ i ] );
+
+ // Place first button to left aligned, second center aligned and third right aligned
+ alignButton.SetProperty( Actor::Property::ANCHOR_POINT, Vector3( i * 0.5f, 0.0f, 0.5f ) );
+ alignButton.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( i * 0.5f, 0.0f, 0.5f ) );
+
+ rootActor.Add( alignButton );
+
+ if( i == 0 )
+ {
+ // Set the first button as selected
+ alignButton.SetProperty( Button::Property::SELECTED, true );
+ }
+ }