Hi tua,
If you think it is a bug, then you have to report it as a bug report. I think it will then be decided by the chief developers.
Alternatively, this would be a solution to react to the different events.
Code: Select all
Procedure LI_Change()
Static s_item.i = -1
Protected item.i
; #PB_EventType_Change = 768
; Selected item or -1 if there is no item selected
item = GetGadgetState(EventGadget())
If item = -1 ; Event -> Deselect
If s_item > -1
Debug "do something with the deselected item = " + s_item ; use the kept item
;
EndIf
Else ; Event -> Select
Debug "do something with the selected item = " + item ; use the current item
;
EndIf
s_item = item ; keep the (de) selection for the next event
EndProcedure
If OpenWindow(0, 100, 100, 300, 300, "Test", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
li = ListIconGadget(#PB_Any, 10, 10, 280, 280, "ID", 50, #PB_ListIcon_GridLines | #PB_ListIcon_FullRowSelect | #PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(li, 1, "Name", 210)
AddGadgetItem(li, -1, Str(15) + #LF$ + "John Doe")
AddGadgetItem(li, -1, Str(237) + #LF$ + "Jane Doe")
AddGadgetItem(li, -1, Str(172) + #LF$ + "Baby Doe")
;
BindGadgetEvent(li, @LI_Change(), #PB_EventType_Change)
EndIf
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow
Happy coding and stay healthy.