View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0025554||Lazarus||LCL||public||2014-01-18 14:08||2018-05-10 16:21|
|Reporter||sys||Assigned To||Bart Broersma|
|Product Version||Product Build|
|Target Version||1.8||Fixed in Version||1.8|
|Summary||0025554: pagecontrol onchange event|
|Description||pagecontrol1.activepageindex := 1; onchange event happens|
Not work like this delphi xe3. Only happen when user change tab
|Tags||No tags attached.|
|Fixed in Revision||r53089, r53387|
|parent of||0030904||closed||Bart Broersma||Empty component pallete page when selected with pallete drop-down form|
|has duplicate||0027324||resolved||Bart Broersma||TTabControl/TPageControl.OnChange is not called on first page addition|
|related to||0031096||resolved||Juha Manninen||Sparta: designer don't show ok on F12|
|related to||0033720||resolved||Bart Broersma||TTabControl/TCustomTabControl OnChanging triggers from code but shouldn't|
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.
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?
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.
||Elevate this discussion to devel ML?|
||Yes, we can also talk there ;) and maybe other developer use the OnChange event now and have a own opinion.|
> 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?
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
||Made it configurable in r53387.|
|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|