X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6d94998fcbdb3ce60774e38c0d4b6ee20c6798..dbda9e86f0e5ec1184bc16d135bb7205bc99236e:/src/generic/notebook.cpp diff --git a/src/generic/notebook.cpp b/src/generic/notebook.cpp index cced371845..3be3cd9634 100644 --- a/src/generic/notebook.cpp +++ b/src/generic/notebook.cpp @@ -29,7 +29,8 @@ #include #include -#include +#include +#include #include #include @@ -52,7 +53,7 @@ BEGIN_EVENT_TABLE(wxNotebook, wxControl) EVT_MOUSE_EVENTS(wxNotebook::OnMouseEvent) EVT_SET_FOCUS(wxNotebook::OnSetFocus) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) - EVT_IDLE(wxNotebook::OnIdle) +// EVT_IDLE(wxNotebook::OnIdle) END_EVENT_TABLE() IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) @@ -108,9 +109,11 @@ bool wxNotebook::Create(wxWindow *parent, m_windowId = id == -1 ? NewControlId() : id; // It's like a normal window... - if (!wxWindow::Create(parent, id, pos, size, style, name)) + if (!wxWindow::Create(parent, id, pos, size, style|wxNO_BORDER, name)) return FALSE; + SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE)); + SetTabView(new wxNotebookTabView(this)); return TRUE; @@ -623,7 +626,12 @@ void wxNotebookTabView::OnTabActivate(int activateId, int deactivateId) if (!m_notebook) return; +// Because of name truncation! +#if defined(__BORLANDC__) && defined(__WIN16__) + wxNotebookEvent event(wxEVT_COMMAND_NB_PAGE_CHANGED, m_notebook->GetId()); +#else wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_notebook->GetId()); +#endif // Translate from wxTabView's ids (which aren't position-dependent) // to wxNotebook's (which are).