If tab stops are set, existing items in the list box are not invalidated

Raimonds Praude raimonds.praude at sets.lv
Thu Jan 12 09:51:09 CST 2006


If tab stops are set, existing items in the list box are not invalidated
(i.e., not automatically re-drawn.) after a new item is inserted.

LISTBOX_InvalidateItems( descr, descr->top_item ) function is called now
with a top visible item parameter if an item is inserted and if the list
box style is LBS_USETABSTOPS.

Index: dlls/user/listbox.c
===================================================================
RCS file: /home/wine/wine/dlls/user/listbox.c,v
retrieving revision 1.26
diff -u -r1.26 listbox.c
--- dlls/user/listbox.c	1 Dec 2005 11:59:24 -0000	1.26
+++ dlls/user/listbox.c	12 Jan 2006 15:42:03 -0000
@@ -1566,7 +1566,10 @@
      /* Repaint the items */

      LISTBOX_UpdateScroll( descr );
-    LISTBOX_InvalidateItems( descr, index );
+    if (descr->style & LBS_USETABSTOPS)
+        LISTBOX_InvalidateItems( descr, descr->top_item );
+    else
+        LISTBOX_InvalidateItems( descr, index );

      /* Move selection and focused item */
      /* If listbox was empty, set focus to the first item */



More information about the wine-patches mailing list