[Lazarus] ListView.OnSelectItem - which LCL backend is correct?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Fri May 15 08:14:14 CEST 2015


Hi,

I found a bug in LCL's TListView. The OnSelectItem event. When you
select an item in the Listview, that event is triggered twice. Once with
the Selected = True (indicating the new selection) and once with the
Selected = False (indicating the old selection).

But the order of those events are reversed between LCL-Win32/64 and
LCL-GTK2. I haven't tried other LCL backends, so don't know the order
of them.

So which backend has the correct behaviour, so I can file a bug report
for the other one. Seeing has LCL by design is very Windows centric, I'm
assuming the LCL-Win32/64 is the correct behaviour?

Unfortunately the documentation doesn't specify the expected behaviour.
http://lazarus-ccr.sourceforge.net/docs/lcl/comctrls/tcustomlistview.onselectitem.html

Also, it seems that under LCL-GTK2 the first time you select a new item,
it generates this event more times than under LCL-Win32/64.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/




More information about the Lazarus mailing list