Show: Delphi C++
Display Preferences

Vcl.Controls.TControl.ParentToClient

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ParentToClient(const Point: TPoint; AParent: TWinControl = nil): TPoint;

C++

System::Types::TPoint __fastcall ParentToClient(const System::Types::TPoint &Point, TWinControl* AParent = (TWinControl*)(0x0));

Properties

Type Visibility Source Unit Parent
function public
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

Translate parent coordinates to client coordinates.

ParentToClient translates Point from the AParent's coordinate system to the current control's coordinate system. AParent must be a control that can be found by iterating up the chain of Parent properties. If AParent is nil (Delphi) or NULL (C++), the control's immediate parent is used.

An EInvalidOperation exception is thrown if AParent is not an ancestor control or the Parent property is nil (Delphi) or NULL (C++).

See Also

Personal tools
In Other Languages
Previous Versions
Assistance