Program: bbtk
Module: $RCSfile: bbwxLayoutTab.cxx,v $
Language: C++
- Date: $Date: 2008/11/25 13:18:33 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/11/26 12:18:32 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
void LayoutTab::OnShowWidget()
{
//bbGetOutputWidget()->Show();
-
- bbUserOnShowWidget("Widget1");
- bbUserOnShowWidget("Widget2");
- bbUserOnShowWidget("Widget3");
- bbUserOnShowWidget("Widget4");
- bbUserOnShowWidget("Widget5");
- bbUserOnShowWidget("Widget6");
- bbUserOnShowWidget("Widget7");
- bbUserOnShowWidget("Widget8");
- bbUserOnShowWidget("Widget9");
+ wxNotebook* w = (wxNotebook*)bbGetOutputWidget();
+ if (w)
+ {
+ if (w->GetPageCount()>0)
+ {
+ w->SetSelection(0);
+ for (unsigned int i=0; i<w->GetPageCount(); ++i) w->AdvanceSelection();
+ }
+ bbUserOnShowWidget("Widget1");
+ bbUserOnShowWidget("Widget2");
+ bbUserOnShowWidget("Widget3");
+ bbUserOnShowWidget("Widget4");
+ bbUserOnShowWidget("Widget5");
+ bbUserOnShowWidget("Widget6");
+ bbUserOnShowWidget("Widget7");
+ bbUserOnShowWidget("Widget8");
+ bbUserOnShowWidget("Widget9");
+ }
}