Index: TabBarCtrl.cpp =================================================================== --- TabBarCtrl.cpp (revision 5457) +++ TabBarCtrl.cpp (working copy) @@ -16,7 +16,12 @@ { ctrls.Add(key, &ctrl); ctrl.Hide(); - pane.Add(ctrl.SizePos()); + + ctrl.TopPos(0).LeftPos(0); + Rect r = GetClientArea(); + ctrl.SetRect(r); + AddChild(&ctrl); + TabBar::InsertKey(ix, key, value, icon, group, make_active); return *this; } @@ -96,4 +101,17 @@ SetCtrl(GetData()); } +void TabBarCtrl::Layout() +{ + TabBar::Layout(); + + for(int i = 0; i < ctrls.GetCount(); i++) + { + Ctrl& ctrl = *ctrls[i]; + ctrl.TopPos(0).LeftPos(0); + Rect r = GetClientArea(); + ctrl.SetRect(r); + } +} + END_UPP_NAMESPACE \ No newline at end of file Index: TabBarCtrl.h =================================================================== --- TabBarCtrl.h (revision 5457) +++ TabBarCtrl.h (working copy) @@ -2,11 +2,10 @@ { private: VectorMap ctrls; - ParentCtrl pane; public: - TabBarCtrl() { Ctrl::Add(pane); } - virtual void Layout() { TabBar::Layout(); pane.SetRect(GetClientArea()); } + TabBarCtrl() {} + virtual void Layout(); TabBarCtrl& AddCtrl(Ctrl &ctrl, Value key, Value value, Image icon = Null, String group = Null, bool make_active = false); TabBarCtrl& AddCtrl(Ctrl &ctrl, Value value, Image icon = Null, String group = Null, bool make_active = false);