+
+bool wxFoldPanelItem::IsVertical() const
+{
+ // grandparent of wxFoldPanelItem is wxFoldPanelBar
+ // default is vertical
+ wxPanel *panel = wxDynamicCast(GetParent(), wxPanel);
+ wxCHECK_MSG( panel, true, _T("wrong parent") );
+ wxFoldPanelBar *bar = wxDynamicCast(panel->GetParent(), wxFoldPanelBar);
+ wxCHECK_MSG( bar, true, _T("wrong parent") );
+ return bar->IsVertical();
+}