RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControl.ClientToParent Method

Translates client coordinates to parent coordinates.

Pascal
function ClientToParent(const Point: TPoint; AParent: TWinControl = nil): TPoint;
C++
__fastcall TPoint ClientToParent(const TPoint Point, TWinControl * AParent = nil);

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++). 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!