Vcl.Controls.TControl.ClientToParent

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

System::Types::TPoint __fastcall ClientToParent(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

Translates client coordinates to parent coordinates.

ClientToParent translates Point from the current control's coordinate system to AParent'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