-#define AddLine(orient) \
- Add( new wxStaticLine( this, -1, wxDefaultPosition, wxSize(2,2), orient), \
- 0, wxEXPAND)
+#if wxUSE_STATLINE
+ #define AddLine(orient) \
+ Add( new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxSize(2,2), orient), \
+ 0, wxEXPAND)
+#else
+ #define AddLine(orient) \
+ Add( 2, 2)
+#endif // wxUSE_STATLINE