Modify

Opened 18 years ago

Closed 18 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 by TicketCleanup, 18 years ago

Milestone: 3.2.13.8
Severity: BlockingNone

Automatic ticket cleanup.

comment:2 by Gary, 18 years ago

Milestone: 3.2.13.8
Resolution: Fixed
Status: newclosed

Fixed in version: 3.2.13.8

Modify Ticket

Action
as closed The owner will remain Gary.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.