Opened 15 years ago

Closed 15 years ago

#965 closed Bug (No Bug)

ListViewItem not responding to SetOnEvent

Reported by: andybiochem Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


If the number of delimited items in the "text" of a ListViewItem is greater than the number of columns in the ListView control itself, the ListViewItem will not respond to a SetOnEvent declaration.


Opt("GUIOnEventMode", 1)

GUICreate("", 220, 150)

;----- NOT WORKING -----
$ListView1 = GUICtrlCreateListView("Col1|Col2|Col3", 10, 10, 190, 50)

;----- WORKING OK -----
$ListView2 = GUICtrlCreateListView("Col1|Col2|Col3|Col4", 10, 70, 190, 50)


While 1

Func _Selected()
    ConsoleWrite(@GUI_CtrlId & @CRLF)

... clicking on the top ListViewItem does not call the function set by 'GUICtrlSetOnEvent'.

The second ListViewItem works as it should.

Attachments (0)

Change History (2)

comment:1 Changed 15 years ago by andybiochem

Just discovered here that the problem is due to GUICtrlCreateListViewItem not returning a control ID upon creation. If the control creation fails, so be it, but the ListViewItem IS actually created in this case, and appears in the ListView control.

comment:2 Changed 15 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

Just read the doc the control can fail and you are in the case

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 ticket will remain with no owner.

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

Note: See TracTickets for help on using tickets.