Bounds,routine,TRect,object,deplhi

Omar 10/12/2016 0

This example illustrates how to use the Bounds routine to assign coordinates to a TRect object

Delphi
 uses
  System.SysUtils, System.Types;
var
  aRectangle:TRect;
...
begin
  try
    aRectangle := Bounds(4,5,16,25);
    {
    equivalent to:
      aRectangle.Left := 4;
      aRectangle.Top := 5;
      aRectangle.Width := 16;
      aRectangle.Height := 25;
    }
    WriteLn(aRectangle.Left,' ', aRectangle.Top, ' ',aRectangle.Right,' ',aRectangle.Bottom);
    //The console will output: 4 5 20 30, representing the coordinates for '''aRectangle'''.
end. 

Report Bug

Please Login to Report Bug

Reported Bugs

Comments

Please Login to Comment

Comments