HasScrollbar() always returns False

In the attached program, the choice item manipulates the width of a column
in a list control and the number of items in the list control to control
whether or not there are scrollbars. Regardless, HasScrollbar() always
returns False no matter what I try. Any suggestions?

wx-test8a.py (2.59 KB)

···

--
Jeffrey Barish

Jeffrey Barish wrote:

In the attached program, the choice item manipulates the width of a column
in a list control and the number of items in the list control to control
whether or not there are scrollbars. Regardless, HasScrollbar() always
returns False no matter what I try. Any suggestions?

HasScrollbar is implemented like this:

     bool HasScrollbar(int orient) const
     {
         return (m_windowStyle &
                 (orient == wxHORIZONTAL ? wxHSCROLL : wxVSCROLL)) != 0;
     }

So all it does is check if the window was created with the wxHSCROLL or wxVSCROLL style.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!