View Issue Details

IDProjectCategoryView StatusLast Update
0024695LazarusLCLpublic2015-03-01 14:13
ReporterAnton Assigned ToBart Broersma  
Status closedResolutionfixed 
Product Version1.1 (SVN) 
Fixed in Version1.4 
Summary0024695: CheckListBox: space bar events - incompatibility with Delphi
DescriptionIn Delphi space bar triggers OnClickCheck event.
See 0024627
Steps To ReproducePlace CheckListBox on the empty form and add some items to it;
Create OnClickCheck event;
Run project and press space
TagsNo tags attached.
Fixed in Revisionr47992, rr47993
Attached Files


related to 0024627 closedZeljan Rikalo Pressing SpaceBar in CheckListBox leads to exception 


Vojtech Cihak

2013-07-01 23:11

reporter   ~0068678

What is the difference between OnItemClick and OnClickCheck on Delphi ?

BTW, I tried to change the state from code (CheckListBox1.Checked[1] := not CheckListBox1.Checked[1];) and it does not trigger any event (OnClick, OnItemClick nor OnClickChange). I tested on Qt. Is it OK?

Zeljan Rikalo

2013-07-02 10:54

developer   ~0068684

OnClickChange,OnItemClick,OnClick SHOULD NOT trigger when checked state is changed via code. They should trigger only when user changed checked state via mouse or space bar.

Vojtech Cihak

2013-07-02 14:38

reporter   ~0068692

Are you sure with OnClick? Because TCheckBox triggers OnClick when state is changed via code (Qt, GTK2).

Zeljan Rikalo

2013-07-02 17:51

developer   ~0068695

Afair in kylix it was so (which was D7 compatibile).
Someone should provide correct infos about delphi behaviour in this case so we can fix it (if fix is needed).

Bart Broersma

2015-02-25 17:53

developer   ~0081425

Last edited: 2015-02-25 18:00

View 2 revisions

Delphi 7:
Press space: OnClickCheck
Traverse list by arrowkeys: OnClick
Change checked state by code: no OnClickCheck
D7 does not have OnItemClick or OnClickChange

Bart Broersma

2015-02-25 17:56

developer   ~0081426

> TCheckBox triggers OnClick when state is changed via code
Which is Delphi compatible.

Bart Broersma

2015-02-25 18:15

developer   ~0081427

Last edited: 2015-02-25 18:21

View 3 revisions

When ChckListBox has initial focus, press space
D7: OnClick + OnClickCheck, any consecutive spacebar -> OnClickCheck
Lazarus: OnClick, any consecutive spacebar -> OnItemClick

Click with mouse on checkbox:
D7: OnClickCheck + OnClick
Lazarus: OnClickCheck + OnItemClick + OnClick

Click beside the checkbox:
D7: OnClick (checked state does not alter)
Lazarus: idem

Change checked state by code;
D7: no event
Lazarus: idem

All tested with Lazarus 1.5 r47872 on Win7-64 (32-bit fpc).

Bart Broersma

2015-02-25 19:12

developer   ~0081428

Made it work like in D7.
ToDo: does Delphi fire OnItemClick in this case, and if so, does it do that in the same order as we do?
(Needs more recent Delphi)

Issue History

Date Modified Username Field Change
2013-07-01 22:16 Anton New Issue
2013-07-01 23:11 Vojtech Cihak Note Added: 0068678
2013-07-02 10:54 Zeljan Rikalo Note Added: 0068684
2013-07-02 14:38 Vojtech Cihak Note Added: 0068692
2013-07-02 17:51 Zeljan Rikalo Note Added: 0068695
2014-10-17 21:46 Juha Manninen Relationship added related to 0024627
2015-02-25 17:53 Bart Broersma Note Added: 0081425
2015-02-25 17:56 Bart Broersma Note Added: 0081426
2015-02-25 18:00 Bart Broersma Note Edited: 0081425 View Revisions
2015-02-25 18:15 Bart Broersma Note Added: 0081427
2015-02-25 18:18 Bart Broersma Note Edited: 0081427 View Revisions
2015-02-25 18:21 Bart Broersma Note Edited: 0081427 View Revisions
2015-02-25 19:12 Bart Broersma LazTarget => -
2015-02-25 19:12 Bart Broersma Note Added: 0081428
2015-02-25 19:12 Bart Broersma Status new => resolved
2015-02-25 19:12 Bart Broersma Resolution open => fixed
2015-02-25 19:12 Bart Broersma Assigned To => Bart Broersma
2015-02-25 19:15 Bart Broersma Fixed in Revision => r47992
2015-02-25 19:15 Bart Broersma Fixed in Version => 1.4
2015-02-25 20:12 Bart Broersma Fixed in Revision r47992 => r47992, rr47993
2015-03-01 14:13 Anton Status resolved => closed