View Issue Details

IDProjectCategoryView StatusLast Update
0033991LazarusLCLpublic2019-01-14 13:15
ReporterHartmut Assigned ToMichl  
Status closedResolutionfixed 
Product Version1.8.4 
Summary0033991: Event TComboBox.OnEditingDone is fired wrongly when clicking on TabSheets
DescriptionYou have a ComboBox and a TPageControl with 2 TabSheets and 1 Button on each. When clicking on the TabSheets and the Buttons the focus wrongly is passed to the ComboBox. Clicking the next Button will remove the focus from the ComboBox and the TComboBox.OnEditingDone event is fired, although the ComboBox has never been clicked.
As wp found out, this bug only occurs, if ComboBox.TabOrder=0.
This bug occurs on Windows 7, but not on Linux with Gtk2.
Steps To Reproducea) compile and start the attached project on Windows
b) click on TabSheet2
c) click on Button 2
d) click on TabSheet1 (result: ComboBox1 receives the focus wrongly)
e) click on Button 1
Result: event TComboBox.OnEditingDone is fired, although this component was NOT "edited".
TagsNo tags attached.
Fixed in Revision59186
Attached Files


related to 0034870 closedZeljan Rikalo TCustomTabControl.ShowCurrentPage regression from r59186 by michl 



2018-07-15 18:02

reporter (2,810 bytes)

Ondrej Pokorny

2018-07-15 22:51

developer   ~0109500

This is as designed.

OnEditingDone is fired when a control loses focus regardless of the fact if the actual value was changed or not.

You have to take care of the change detection yourself (you have to store the last applied value when you process it and then check against it).

Ondrej Pokorny

2018-07-15 22:53

developer   ~0109501


d) click on TabSheet1 (result: ComboBox1 receives the focus wrongly)

This is not wrong but Windows native behavior. On Windows when you change a tab in a page control the first control (TabOrder=0) is focused.


2018-07-16 00:31

developer   ~0109506

> This is not wrong but Windows native behavior. On Windows when you change a
> tab in a page control the first control (TabOrder=0) is focused.

Are you sure? Delphi does not show this behavior, it does not move the focus to the TabOrder=0 control when another sheet is selected.


2018-09-29 23:58

developer   ~0111093

This was indeed Delphi incompatible. When a control on a tabsheet was focused, the pagecontrol should not loose the focus but the first control on the new selected tabsheet should get it.

Fixed in trunk revision 59186. Please test and close if ok.


2018-09-30 20:06

reporter (6,707 bytes)


2018-09-30 20:07

reporter   ~0111123

I downloaded trunk revision 59194 and started compiling Lazarus with "make". I got a fatal error (see attached file
I used make.exe from fpc 3.0.4 on Windows 7 32 bit.

I'm not a developer. I'm an absolute beginner to svn, makefiles and compiling lazarus. So I need detailed help how to proceed. Thanks.


2018-09-30 20:48

developer   ~0111124

What was your make command?

I add my create.bat, what is running fine here, just tested (maybe you can adapt it).
You can also use FpcUpDeluxe for creating a Lazarus trunk.


2018-09-30 20:48


createLazTrunk.bat (457 bytes)


2018-09-30 21:14

reporter   ~0111125

My make command was just "make" which had been successfull in July.

Now I tried your make clean all OPT="-glw2" and got the same fatal error than before.


2018-09-30 21:35

developer   ~0111127

Please make sure, you have a checked out a clean trunk.

E.G. do:

svn cleanup --remove-unversioned --remove-ignored YourLazarusTrunkDirectory

and then:

svn co YourLazarusTrunkDirectory


2018-10-01 18:12

reporter (6,715 bytes)


2018-10-01 18:14

reporter   ~0111163

I tried "svn cleanup --remove-unversioned --remove-ignored lazarus" but got error "svn: invalid option: --remove-unversioned".

My SVN version is 1.8.17 (which is the current version on running on Windows 7 32 bit.

So I did the following:
 - created a new empty folder
 - entered in this folder "svn co lazarus"
 - got revision 59221 = 337 MB
 - cd lazarus
 - H:\Progs\Lazarus\184\fpc\3.0.4\bin\i386-win32\make.exe clean all OPT="-glw2"
 - got the same fatal error than 2x before (see attached file

H:\Progs\Lazarus\184\fpc\3.0.4\bin\i386-win32\make.exe belongs to Lazarus 1.8.4 release version.
What shall I do?


2018-10-01 20:48

developer   ~0111166

The problem is, that you compile with fpc option -CR (just tested to compile Lazarus with it, I got the same error). Disable it, then it should work.


2018-10-01 21:43

reporter   ~0111169

OK, with that info I could compile and start Lazarus. Thank you for your help!
Will continue tomorrow with testing.


2018-10-02 14:13

reporter   ~0111198

I tested this Bug with Revision 59221. The bug is fixed. Thank you for fixing.


2018-10-02 14:13

reporter   ~0111199

I tested this Bug with Revision 59221. The bug is fixed. Thank you for fixing.

Issue History

Date Modified Username Field Change
2018-07-15 18:02 Hartmut New Issue
2018-07-15 18:02 Hartmut File Added:
2018-07-15 18:12 Michl Assigned To => Michl
2018-07-15 18:12 Michl Status new => assigned
2018-07-15 22:51 Ondrej Pokorny Note Added: 0109500
2018-07-15 22:53 Ondrej Pokorny Note Added: 0109501
2018-07-16 00:31 wp Note Added: 0109506
2018-09-29 23:58 Michl Fixed in Revision => 59186
2018-09-29 23:58 Michl LazTarget => -
2018-09-29 23:58 Michl Note Added: 0111093
2018-09-29 23:58 Michl Status assigned => resolved
2018-09-29 23:58 Michl Resolution open => fixed
2018-09-30 20:06 Hartmut File Added:
2018-09-30 20:07 Hartmut Note Added: 0111123
2018-09-30 20:48 Michl Note Added: 0111124
2018-09-30 20:48 Michl File Added: createLazTrunk.bat
2018-09-30 21:14 Hartmut Note Added: 0111125
2018-09-30 21:35 Michl Note Added: 0111127
2018-10-01 18:12 Hartmut File Added:
2018-10-01 18:14 Hartmut Note Added: 0111163
2018-10-01 20:48 Michl Note Added: 0111166
2018-10-01 21:43 Hartmut Note Added: 0111169
2018-10-02 14:13 Hartmut Note Added: 0111198
2018-10-02 14:13 Hartmut Note Added: 0111199
2018-10-02 14:13 Hartmut Status resolved => closed
2019-01-14 13:15 Zeljan Rikalo Relationship added related to 0034870