- Actor radioGroup2Background = Toolkit::CreateSolidColorActor( BACKGROUND_COLOUR );
- radioGroup2Background.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- radioGroup2Background.SetParentOrigin( ParentOrigin::TOP_LEFT );
- radioGroup2Background.SetPosition( DP(MARGIN_SIZE), DP(yPos) );
- radioGroup2Background.SetRelayoutEnabled( true );
- radioGroup2Background.SetPreferredSize( Vector2( DP(348), DP(GROUP2_HEIGHT) ) );
- mContentLayer.Add( radioGroup2Background );
-
- Actor radioButtonsGroup2 = Actor::New();
- radioButtonsGroup2.SetParentOrigin( ParentOrigin::TOP_LEFT );
- radioButtonsGroup2.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- radioButtonsGroup2.SetPosition( DP(MARGIN_SIZE), DP(MARGIN_SIZE) );
- radioButtonsGroup2.SetRelayoutEnabled( true );
- radioButtonsGroup2.SetPreferredSize( Vector2( DP(100), DP(160) ) );
-
- radioGroup2Background.Add( radioButtonsGroup2 );
+ Toolkit::TableView radioGroup2Background = Toolkit::TableView::New( 2, 2 );
+ radioGroup2Background.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
+ radioGroup2Background.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
+ radioGroup2Background.SetBackgroundColor( BACKGROUND_COLOUR );
+ radioGroup2Background.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
+ radioGroup2Background.SetFitHeight( 0 );
+ radioGroup2Background.SetFitHeight( 1 );
+ radioGroup2Background.SetFitWidth( 0 );
+
+ contentTable.Add( radioGroup2Background );
+
+ Toolkit::TableView radioButtonsGroup2 = Toolkit::TableView::New( 3, 1 );
+ radioButtonsGroup2.SetCellPadding( Size( 0.0f, MARGIN_SIZE * 0.5f ) );
+ radioButtonsGroup2.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
+ for( unsigned int i = 0; i < radioButtonsGroup2.GetRows(); ++i )
+ {
+ radioButtonsGroup2.SetFitHeight( i );
+ }
+ radioButtonsGroup2.SetFitWidth( 0 );
+
+ radioGroup2Background.AddChild( radioButtonsGroup2, Toolkit::TableView::CellPosition( 0, 0 ) );
+
+ // TableView to lay out 3x Radio buttons on the left, and 3x Image thumbnails on the right.
+ Toolkit::TableView imageSelectTableView = Toolkit::TableView::New( 3, 2 );
+ imageSelectTableView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
+ imageSelectTableView.SetFitHeight( 0 );
+ imageSelectTableView.SetFitHeight( 1 );
+ imageSelectTableView.SetFitHeight( 2 );
+ imageSelectTableView.SetFitWidth( 0 );
+ imageSelectTableView.SetFitWidth( 1 );
+ imageSelectTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) );
+
+ radioButtonsGroup2.Add( imageSelectTableView );