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: Component: Standard UDFs
Version: Severity: None
Keywords: Cc:


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


Func _Main()
	; Create GUI
	GUICreate("ListView Click Item", 400, 300)
	$hListView = GUICtrlCreateListView("", 2, 2, 394, 268)

	; 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
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 deleted
  • Severity changed from Blocking to None

Automatic ticket cleanup.

comment:2 Changed 16 years ago by Gary

  • Milestone set to
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed in version:

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.

Add Comment

Modify Ticket

as closed The owner will remain Gary.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.