#include "wx/wxprec.h"
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
-#include "wx/defs.h"
-
#if wxUSE_BOOKCTRL
#ifndef WX_PRECOMP
// This gives more space around the edges
m_innerSizer = new wxBoxSizer( wxVERTICAL );
- int extraSpace = 2;
#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
- extraSpace=0;
+ m_sheetOuterBorder = 0;
#endif
- topSizer->Add(m_innerSizer, 1, wxGROW|wxALL, extraSpace);
+ topSizer->Add(m_innerSizer, 1, wxGROW|wxALL, m_sheetOuterBorder);
m_bookCtrl = CreateBookCtrl();
AddBookCtrl(m_innerSizer);
m_sheetStyle = wxPROPSHEET_DEFAULT;
m_innerSizer = NULL;
m_bookCtrl = NULL;
+ m_sheetOuterBorder = 2;
+ m_sheetInnerBorder = 5;
}
// Layout the dialog, to be called after pages have been created
#endif
wxBookCtrlBase* bookCtrl = NULL;
-
+
#if wxUSE_NOTEBOOK
if (GetSheetStyle() & wxPROPSHEET_NOTEBOOK)
bookCtrl = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style );
bookCtrl = new wxChoicebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style );
#endif
#if wxUSE_TOOLBOOK
-#if wxUSE_TOOLBAR && wxUSE_BMPBUTTON
+#if defined(__WXMAC__) && wxUSE_TOOLBAR && wxUSE_BMPBUTTON
if (GetSheetStyle() & wxPROPSHEET_BUTTONTOOLBOOK)
bookCtrl = new wxToolbook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style|wxBK_BUTTONBAR );
else
#endif
if (!bookCtrl)
bookCtrl = new wxBookCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style );
-
+
if (GetSheetStyle() & wxPROPSHEET_SHRINKTOFIT)
bookCtrl->SetFitToCurrentPage(true);
-
+
return bookCtrl;
}
int borderSize = -2;
sizer->Add( m_bookCtrl, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP|wxRIGHT, borderSize );
#else
- sizer->Add( m_bookCtrl, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+ sizer->Add( m_bookCtrl, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, m_sheetInnerBorder );
#endif
}
void wxPropertySheetDialog::OnIdle(wxIdleEvent& event)
{
event.Skip();
-
+
if ((GetSheetStyle() & wxPROPSHEET_SHRINKTOFIT) && GetBookCtrl())
{
int sel = GetBookCtrl()->GetSelection();
}
#endif // wxUSE_BOOKCTRL
-