Modify

Opened 3 years ago

Closed 3 years ago

#3827 closed Bug (Fixed)

_GUICtrlListView_ClickItem send clicks outside ListView area

Reported by: pixelsearch Owned by: Jpm
Milestone: 3.3.15.5 Component: Standard UDFs
Version: 3.3.15.4 Severity: None
Keywords: Cc:

Description

When there is a horizontal scrollbar in ListView, if this scrollbar is dragged to the right, then _GUICtrlListView_ClickItem() will often click outside the ListView area and not on the ListView Item.
This wrong behavior will very often have the GUI lose focus. Reproducer :

#include <GuiListView.au3>
#include <GuiConstantsEx.au3>

$hGUI = GUICreate("Test", 500, 400)

$idListView = GUICtrlCreateListView("Col0|Col1|Col2|Col3|Col4|Col5|Col6|Col7|Col8|Col9", 10, 10, 480, 300)
For $i = 0 To 9
    _GUICtrlListView_SetColumnWidth($idListView, $i, 200)
Next
$idItem = GUICtrlCreateListViewItem("0|1|2|3|4|5|6|7|8|9", $idListview)

$idButton = GUICtrlCreateButton("Click me", 200, 340, 85, 25)

GUISetState()

While 1
	Switch GUIGetMsg()
		Case $GUI_EVENT_CLOSE
			ExitLoop

		Case $idButton ; click when scrollbar is on left (ok), then click with scrollbar on right => GUI goes to background :(
			_GUICtrlListView_ClickItem($idListView, 0)
	EndSwitch
WEnd

GUIDelete($hGui)

Workaround & solutions provided by spudw2k, Danyfirex and Nine in this thread :
https://www.autoitscript.com/forum/topic/206066-_guictrllistview_clickitem-issue/

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by Jpm

  • Milestone set to 3.3.15.5
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [12579] in version: 3.3.15.5

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

Action
as closed The owner will remain Jpm.
Author


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

 
Note: See TracTickets for help on using tickets.