+// ----------------------------------------------------------------------------
+// misc accessors
+// ----------------------------------------------------------------------------
+
+bool wxScrollBar::IsStandalone() const
+{
+ wxWindow *parent = GetParent();
+ if ( !parent )
+ {
+ return TRUE;
+ }
+
+ return (parent->GetScrollbar(wxHORIZONTAL) != this) &&
+ (parent->GetScrollbar(wxVERTICAL) != this);
+}
+
+bool wxScrollBar::AcceptsFocus() const
+{
+ // the window scrollbars never accept focus
+ return wxScrollBarBase::AcceptsFocus() && IsStandalone();
+}
+