wxListBox input handling works for single and multi selection ones (not

extended yet)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8242 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-09-02 20:16:04 +00:00
parent afcd76dae8
commit 4d437f4b2b
9 changed files with 284 additions and 51 deletions

View File

@@ -289,22 +289,37 @@ void wxWindow::SetScrollbar(int orient,
bool refresh)
{
wxScrollBar *scrollbar = GetScrollbar(orient);
if ( !scrollbar )
if ( range )
{
// create it
scrollbar = new wxScrollBar(this, -1,
wxDefaultPosition, wxDefaultSize,
orient & wxVERTICAL ? wxSB_VERTICAL
: wxSB_HORIZONTAL);
if ( orient & wxVERTICAL )
m_scrollbarVert = scrollbar;
else
m_scrollbarHorz = scrollbar;
if ( !scrollbar )
{
// create it
scrollbar = new wxScrollBar(this, -1,
wxDefaultPosition, wxDefaultSize,
orient & wxVERTICAL ? wxSB_VERTICAL
: wxSB_HORIZONTAL);
if ( orient & wxVERTICAL )
m_scrollbarVert = scrollbar;
else
m_scrollbarHorz = scrollbar;
PositionScrollbars();
PositionScrollbars();
}
scrollbar->SetScrollbar(pos, thumb, range, thumb, refresh);
}
else // no range means no scrollbar
{
if ( scrollbar )
{
delete scrollbar;
scrollbar->SetScrollbar(pos, thumb, range, thumb, refresh);
if ( orient & wxVERTICAL )
m_scrollbarVert = NULL;
else
m_scrollbarHorz = NULL;
}
}
}
void wxWindow::SetScrollPos(int orient, int pos, bool refresh)