fix list-box scrollbar when using horizontal labels (PR 8661)

svn: r6217
This commit is contained in:
Matthew Flatt 2007-05-12 23:54:43 +00:00
parent 44fab79324
commit e569fae266

View File

@ -200,7 +200,7 @@ Bool wxListBox::Create(wxPanel *panel, wxFunction func,
if (Title) {
cListTitle = new WXGC_PTRS wxLabelArea(this, Title, label_font,
labelPosition == wxVERTICAL ? wxTop : wxLeft);
labelPosition == wxVERTICAL ? wxTop : wxLeft);
} else
cListTitle = NULL;
@ -274,8 +274,12 @@ void wxListBox::OnEvent(wxMouseEvent *event)
SetCurrentDC();
// For scroll bars:
startPt0.v = startV;
startPt0.h = startH - (cWindowWidth - 16);
{
int cw, ch;
GetClientSize(&cw, &ch);
startPt0.v = startV;
startPt0.h = startH - (cw - 16);
}
startPt.v = startV + SetOriginY; // port c.s.
startPt.h = startH + SetOriginX;