Invalidate the focused item when scrolling horizontally so that it
repaints correctly.
This commit is contained in:
parent
00c5250a84
commit
66c1accb6f
|
@ -1210,8 +1210,14 @@ static void LISTBOX_SetHorizontalPos( HWND hwnd, LB_DESCR *descr, INT pos )
|
||||||
descr->horz_pos = pos;
|
descr->horz_pos = pos;
|
||||||
LISTBOX_UpdateScroll( hwnd, descr );
|
LISTBOX_UpdateScroll( hwnd, descr );
|
||||||
if (abs(diff) < descr->width)
|
if (abs(diff) < descr->width)
|
||||||
|
{
|
||||||
|
RECT rect;
|
||||||
|
/* Invalidate the focused item so it will be repainted correctly */
|
||||||
|
if (LISTBOX_GetItemRect( descr, descr->focus_item, &rect ) == 1)
|
||||||
|
InvalidateRect( hwnd, &rect, TRUE );
|
||||||
ScrollWindowEx( hwnd, diff, 0, NULL, NULL, 0, NULL,
|
ScrollWindowEx( hwnd, diff, 0, NULL, NULL, 0, NULL,
|
||||||
SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN );
|
SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
InvalidateRect( hwnd, NULL, TRUE );
|
InvalidateRect( hwnd, NULL, TRUE );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue