- height = (delta * weight) + extra;
- extra = 0; // only the first item will get the remainder as extra size
+ wxCoord height = size.y;
+ if (item->GetOption())
+ {
+ height = (delta * weight) + extra;
+ extra = 0; // only the first item will get the remainder as extra size
+ }
+
+ wxPoint child_pos( pt );
+ wxSize child_size( wxSize( size.x, height) );
+
+ if (item->GetFlag() & (wxEXPAND | wxSHAPED))
+ child_size.x = m_size.x;
+ else if (item->GetFlag() & wxALIGN_RIGHT)
+ child_pos.x += m_size.x - size.x;
+ else if (item->GetFlag() & (wxCENTER | wxALIGN_CENTER_HORIZONTAL))
+ // XXX wxCENTER is added for backward compatibility;
+ // wxALIGN_CENTER should be used in new code
+ child_pos.x += (m_size.x - size.x) / 2;
+
+ item->SetDimension( child_pos, child_size );
+
+ pt.y += height;