View Issue Details

IDProjectCategoryView StatusLast Update
0025554LazarusLCLpublic2018-05-10 16:21
ReportersysAssigned ToBart Broersma 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionProduct Build 
Target Version1.8Fixed in Version1.8 
Summary0025554: pagecontrol onchange event
Descriptionpagecontrol1.activepageindex := 1; onchange event happens

Not work like this delphi xe3. Only happen when user change tab
TagsNo tags attached.
Fixed in Revisionr53089, r53387
LazTarget1.8
WidgetsetWin32/Win64
Attached Files

Relationships

parent of 0030904 closedBart Broersma Empty component pallete page when selected with pallete drop-down form 
has duplicate 0027324 resolvedBart Broersma TTabControl/TPageControl.OnChange is not called on first page addition 
related to 0031096 resolvedJuha Manninen Sparta: designer don't show ok on F12 
related to 0033720 resolvedBart Broersma TTabControl/TCustomTabControl OnChanging triggers from code but shouldn't 

Activities

Michl

2016-10-02 18:12

developer   ~0094916

I've seen, you assigned this bug report to you Bart. Just one hint, I was thinking about.

If it is possible, it would be nice to add a option to let the programmers decide, what behaviour they want. The old Lazarus one (event is called by programming page changing) or the Delphi like one. Otherwise it would break code (probably not only my ;) ).

Just my two cents.

Bart Broersma

2016-10-02 18:21

developer   ~0094917

I don't think I will, at least not in my initial fix.
Since it is a bug (it is not Delphi compatible), even if we introduce yet another property to control this, it's default should be to behave like in Delphi, so if old code wrongly relies on the current implementation that will still break.

Maybe the fix should not be merged to 1.6 fixes, so we could announce this break in behaviour in the 1.8 release notes?

Michl

2016-10-02 22:51

developer   ~0094927

Hm, I understand your desire, but I never used Delphi (I've just tested it some times). Of cause I use the PageControl really a lot (mostly blank TPageControls, with dynamic added pages and filled with dynamic created TFrames). So for me it isn't important, if the user select a page or it is selected by code, I need the OnChange event to create or initialize the TFrame.

Why do you want to throw this nice and maybe better behaviour away? Why don't you put a new option (a la nboCallPageChangeByCodeSelection) to the Options?

The Delphi behaviour could be the default one. It wouldn't be a big thing, to change the options in objectinspector. To derive a TPageControl and call OnChange by PageControl.ActivePage calls, is a bigger one.

Bart Broersma

2016-10-02 23:06

developer   ~0094928

Elevate this discussion to devel ML?

Michl

2016-10-02 23:29

developer   ~0094930

Yes, we can also talk there ;) and maybe other developer use the OnChange event now and have a own opinion.

Ondrej Pokorny

2016-10-04 17:39

reporter   ~0094954

> Maybe the fix should not be merged to 1.6 fixes, so we could announce this break in behaviour in the 1.8 release notes?

+1000 :)

Bart Broersma

2016-10-10 11:01

developer   ~0095097

Last edited: 2016-10-10 11:08

View 2 revisions

Please test and close if OK.

Note: will not be merged into 1.6 branch.

Documented the change in behaviour: http://wiki.lazarus.freepascal.org/Lazarus_1.8.0_release_notes#TCustomTabControl_setting_TabIndex_or_PageIndex_by_code

Bart Broersma

2016-11-19 17:55

developer   ~0096050

Made it configurable in r53387.

Issue History

Date Modified Username Field Change
2014-01-18 14:08 sys New Issue
2016-07-05 13:59 Juha Manninen Relationship added related to 0027324
2016-10-02 15:54 Bart Broersma Assigned To => Bart Broersma
2016-10-02 15:54 Bart Broersma Status new => assigned
2016-10-02 18:12 Michl Note Added: 0094916
2016-10-02 18:21 Bart Broersma Note Added: 0094917
2016-10-02 22:51 Michl Note Added: 0094927
2016-10-02 23:06 Bart Broersma Note Added: 0094928
2016-10-02 23:29 Michl Note Added: 0094930
2016-10-04 17:39 Ondrej Pokorny Note Added: 0094954
2016-10-04 23:41 Bart Broersma LazTarget => 1.8
2016-10-04 23:41 Bart Broersma Target Version => 1.8
2016-10-10 10:59 Bart Broersma Relationship replaced has duplicate 0027324
2016-10-10 11:01 Bart Broersma Fixed in Revision => r53089
2016-10-10 11:01 Bart Broersma Note Added: 0095097
2016-10-10 11:01 Bart Broersma Status assigned => resolved
2016-10-10 11:01 Bart Broersma Fixed in Version => 1.8
2016-10-10 11:01 Bart Broersma Resolution open => fixed
2016-10-10 11:08 Bart Broersma Note Edited: 0095097 View Revisions
2016-11-11 17:53 Bart Broersma Relationship added parent of 0030904
2016-11-19 17:55 Bart Broersma Fixed in Revision r53089 => r53089, r53387
2016-11-19 17:55 Bart Broersma Note Added: 0096050
2016-12-11 16:35 Juha Manninen Relationship added related to 0031096
2018-05-10 16:21 wp Relationship added related to 0033720