[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Updates the ActiveControl on the parent form when the specified page becomes active.
Source position: comctrls.pp line 466
protected procedure TCustomTabControl.MaybeSelectFirstControlOnPage( |
APage: TCustomPage |
); virtual; |
MaybeSelectFirstControlOnPage is a method used to ensure that the active control on a form is properly updated when the page on the tab control is changed. It prevents the tabbed control from stealing focus if the active control on the parent form is not the tabbed control or one of its child controls.
APage is used to find the next control in the tab order for the page. If a control is found, it is assigned as the ActiveControl on the parent form.
No actions are performed in the method if any of the following conditions are detected:
MaybeSelectFirstControlOnPage is called from the Change method, and occurs when a new value is assigned to the TabIndex property. It occurs after the current Page on the tab control has been made visible and given focus. It is called before the OnChange event handler is signalled.
Raises an EAssertionFailed exception if a value has not been assigned to the APage argument.
Added in LCL version 3.4.
|
Caption for the active page in the tabbed control. |
|
|
The active TCustomPage instance for the tabbed control. |
|
|
Performs actions to show or hide pages when the current page is changed. |
|
|
Signals the OnChanging event handler prior to updates to PageIndex. |
|
|
Event handler signalled prior to changing the active tab/page on the tabbed control. |
|
|
Event handler signalled when the active page (or tab) for the control is changed. |
|
|
Contains the ordinal position for the active Tab in the control. |
|
|
Gets the form instance for the specified Control. |
|
|
Gets or sets the active control on the form. |
|
|
Returns the preceding or next control in the tab order. |
Version 4.0 | Generated 2025-05-03 | Home |