unit barradestado_form;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
  ButtonPanel, StdCtrls, ExtCtrls;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    ButtonPanel1: TButtonPanel;
    Edit1: TEdit;
    Label1: TLabel;
    StaticText1: TStaticText;
    BarraDeEstado: TStatusBar;
    procedure StaticText1Click(Sender: TObject);
    procedure MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.StaticText1Click(Sender: TObject);
begin

end;

procedure TForm1.MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var ctrl: TControl;
begin
BarraDeEstado.Panels[0].Text:= Sender.ClassName;
ctrl := TControl(Sender);
BarraDeEstado.Panels[1].Text:= ctrl.Name;
BarraDeEstado.Panels[2].Text:= Format('Top: %d', [ctrl.Top]);
BarraDeEstado.Panels[3].Text:= Format('Left: %d', [ctrl.Left]);

end;

end.

