lyledg Posted October 25, 2007 Posted October 25, 2007 Has anyone seen this issue when scrolling through a listview, and moving an item up and down in the list?? See attached
Zedna Posted October 25, 2007 Posted October 25, 2007 Search forum I have seen topic about such problem already but I can't remember more details (solution/fix/workaround) Resources UDF ResourcesEx UDF AutoIt Forum Search
lyledg Posted October 25, 2007 Author Posted October 25, 2007 Thanks Zedna, have been looking all morning Can't find the topic...
GaryFrost Posted October 25, 2007 Posted October 25, 2007 right click on desktop, select properties Select appearance tab, select Effects Don't remember but I think you have to turn off the effects. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
lyledg Posted November 6, 2007 Author Posted November 6, 2007 Thanks Gary, you were right...that solved the problem...weird!
Siao Posted November 7, 2007 Posted November 7, 2007 I solved this scrolling glitch by invalidating listview's client rectangle upon $LVN_ENDSCROLL notification. Also added $LVS_EX_DOUBLEBUFFER style to eliminate redraw flicker (eventhough it was no big deal, just one flick). Example using beta... expandcollapse popup#include <GuiListView.au3> Opt("GUICloseOnESC", 0) Opt("GUIOnEventMode", 1) Opt("WinWaitDelay", 0) $sTitle = "Listview gridlines scroll" $hGui = GUICreate($sTitle, 400, 300, -1, -1, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "SysEvents") $listview = GUICtrlCreateListView("asdf|", 0, 0, 400, 250, -1, $LVS_EX_FULLROWSELECT+$LVS_EX_GRIDLINES+$LVS_EX_DOUBLEBUFFER) GUICtrlSendMsg(-1, 0x101E, 0, 350) GUICtrlSendMsg(-1, 0x101E, 1, 50) For $i = 1 To 40 $s = "" For $j = 1 to 40 $s &= Chr(Random(97, 122, 1)) Next GUICtrlCreateListViewItem($s, $listview) Next GUIRegisterMsg($WM_NOTIFY, "On_WM_NOTIFY") GUISetState() While 1 Sleep(1000) WEnd Func SysEvents() Switch @GUI_CtrlId Case $GUI_EVENT_CLOSE Exit EndSwitch EndFunc Func On_WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) ;wparam = cid, lparam = pnmh If $wParam = $listview Then Local $tNMHDR = DllStructCreate("hwnd hWnd;uint cID;int code", $lParam) Local $code = DllStructGetData($tNMHDR, "code") Local $hLV = HWnd(DllStructGetData($tNMHDR, "hWnd")) Switch $code Case $NM_CUSTOMDRAW Case $LVN_ENDSCROLL _WinAPI_InvalidateRect($hLV) EndSwitch ; EndIf Return $GUI_RUNDEFMSG EndFunc "be smart, drink your wine"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now