Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-10

Purpose of TControl.UpdateRolesForForm?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Hans-Peter Diettrich

This method is called by a form, when its Default or Cancel control changes. But why do the affected controls receive no hint about their new role?

What's the intended purpose of this method?

If it is used (overridden) only in TCustomButton, the (there) interesting information could be passed in added arguments.

TControl.ActiveDefaultControlChanged is much more informative, but I suspect an bug in the TCustomForm implementation - NewControl is always Nil.

Can somebody explain, or simplify the current mess in the LCL?

DoDi

Reply by email

Vincent Snijders
to Hans-Peter Diettrich

2011/10/9 Hans-Peter Diettrich :

Show quoted text 12 lines
This method is called by a form, when its Default or Cancel control changes. But why do the affected controls receive no hint about their new role? What's the intended purpose of this method? If it is used (overridden) only in TCustomButton, the (there) interesting information could be passed in added arguments. TControl.ActiveDefaultControlChanged is much more informative, but I suspect an bug in the TCustomForm implementation - NewControl is always Nil. Can somebody explain, or simplify the current mess in the LCL?

See also:
http://bugs.freepascal.org/view.php?id=20443

Vincent

Reply by email