diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index a62a80f8..1fa6a29e 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -2387,7 +2387,9 @@ namespace nana nana::rectangle r; if (rect_lister(r)) { - auto top = new_where.second * item_h + header_visible_px(); + //potential displacement due to partially visible first visible item + auto disp = origin.y - first_display().item * item_h; + auto top = new_where.second * item_h + header_visible_px() - disp; if (checkarea(item_xpos(r), static_cast(top)).is_hit(pos)) new_where.first = parts::checker; }