Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Strange ListView behavior in 3.2.10.0


  • Please log in to reply
1 reply to this topic

#1 Koder

Koder

    Seeker

  • Active Members
  • 47 posts

Posted 28 November 2007 - 04:22 PM

This one is kinda weird. I've noticed that clicking some items in a list view causes other actions to fire (in a while loop GUI). My example includes tabs because I originally thought it might be related but now I don't think so. Double clicking or single clicking items 5 and higher trigger other actions. In another script, single clicking list item 4 switches to another tab... it's different in each case.

AutoIt         
#include <GUIConstants.au3> #include <GuiListView.au3> Global $nMsg, $cnt1, $cnt2, $cnt3 Global $Form = GUICreate("Test", 307, 450, 263, 127, BitOR ($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_SYSMENU)) Global $lbl = GUICtrlCreateLabel("Click or double click list items to see the problem." & @CR & @CR & "In this case, list items 5 and higher trigger other controls.", 10, 1, 275, 52) Global $btn_Add = GUICtrlCreateButton("Add", 144, 50, 57, 33) Global $btn_DeleteAll = GUICtrlCreateButton("Delete All", 244, 50, 57, 33) Global $TabCtrl = GUICtrlCreateTab(0, 90, 305, 333) Global $TabSheet1 = GUICtrlCreateTabItem("Tab 1") Global $lst1 = GUICtrlCreateListView("Col1|Col2|Col3|Col4", 6, 120, 292, 284) Global $TabSheet2 = GUICtrlCreateTabItem("Tab 2") Global $lst2 = GUICtrlCreateListView("Col1|Col2|Col3|Col4", 6, 120, 292, 284) Global $TabSheet3 = GUICtrlCreateTabItem("Tab 3") Global $lst3 = GUICtrlCreateListView("Col1|Col2|Col3|Col4", 6, 120, 292, 284) GUICtrlCreateTabItem("") Global $lblx = GUICtrlCreateLabel("Hi", 10, 430, 275, 52) For $j = 1 To 10     Add($lst1, $cnt1)     Add($lst2, $cnt2)     Add($lst3, $cnt3) Next GUISetState(@SW_SHOW) While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case 0             ContinueLoop         Case -3 ;$GUI_EVENT_CLOSE             Exit(0)         Case $btn_Add             Switch GUICtrlRead($TabCtrl)                 Case 0                     Add($lst1, $cnt1)                 Case 1                     Add($lst2, $cnt2)                 Case 2                     Add($lst3, $cnt3)             EndSwitch         Case $btn_DeleteAll             $cnt1 = 0             $cnt2 = 0             $cnt3 = 0             _GUICtrlListView_DeleteAllItems(ControlGetHandle("", "", $lst1))             _GUICtrlListView_DeleteAllItems(ControlGetHandle("", "", $lst2))             _GUICtrlListView_DeleteAllItems(ControlGetHandle("", "", $lst3))     EndSwitch     GUICtrlSetData($lblx, $nMsg) WEnd Exit(0) Func Add ( $obj, ByRef $k)     Local $idx     $k += 1     $idx = _GUICtrlListView_InsertItem($obj, "+", -1)     _GUICtrlListView_SetItemText($obj, $idx, $k, 0)     _GUICtrlListView_SetItemText($obj, $idx, $obj & " Item " & $k, 1)     _GUICtrlListView_SetItemText($obj, $idx, "Path", 2)     _GUICtrlListView_SetItemText($obj, $idx, "Parms", 3) EndFunc



-Rick

Edited by Koder, 28 November 2007 - 06:05 PM.








#2 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 28 November 2007 - 09:06 PM

Fixed in next UDF delivery

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users