Opened 16 years ago
Closed 16 years ago
#510 closed Bug (Fixed)
_GUICtrlListView_ClickItem: If columns inside listview exceed visible area, clicks outside of the control
Reported by: | michael.sunwoo@… | Owned by: | Gary |
---|---|---|---|
Milestone: | 3.2.13.8 | Component: | Standard UDFs |
Version: | 3.2.13.7 | Severity: | None |
Keywords: | Cc: |
Description
In the function _GUICtrlListView_ClickItem, if the columns inside the listview exceed visible area, the mouse click can happen outside of the control area.
Sample code is below.
#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #include <GuiConstantsEx.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> Opt('MustDeclareVars', 1) Global $hListView _Main() Func _Main() ; Create GUI GUICreate("ListView Click Item", 400, 300) $hListView = GUICtrlCreateListView("", 2, 2, 394, 268) GUISetState() ; Add columns _GUICtrlListView_InsertColumn($hListView, 0, "Column 1", 100) _GUICtrlListView_InsertColumn($hListView, 1, "Column 2", 500) _GUICtrlListView_InsertColumn($hListView, 2, "Column 3", 500) ; Add items _GUICtrlListView_AddItem($hListView, "Row 1: Col 1", 0) _GUICtrlListView_AddItem($hListView, "Row 2: Col 1", 1) _GUICtrlListView_AddItem($hListView, "Row 3: Col 1", 2) _GUICtrlListView_ClickItem($hListView, 1, "left", False, 2) ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main
The expected behavior is it clicks within the currently visible area of the listview control, not the center of the width of all the columns.
This reproduces on BETA v3.2.13.7 and RELEASE v3.2.12.1.
Is there a more programmatic way to select a listview item instead of using a MouseClick (inside the _GUICtrlListView_ClickItem UDF)?
Attachments (0)
Change History (2)
comment:1 Changed 16 years ago by TicketCleanup
- Milestone 3.2.13.8 deleted
- Severity changed from Blocking to None
comment:2 Changed 16 years ago by Gary
- Milestone set to 3.2.13.8
- Resolution set to Fixed
- Status changed from new to closed
Fixed in version: 3.2.13.8
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Automatic ticket cleanup.