
Постом выше описана проблема, вот пример компонента:
- Код: Выделить всё
unit RUS_test;
{$mode objfpc}{$H+}
interface
uses
Controls,Classes,Graphics;
type
TRUS_T=class(TGraphicControl)
protected
procedure Paint;override;
public
constructor Create(AOwner:TComponent);override;
published
property Constraints;
property Align;
property Anchors;
property Height;
property Width;
end;
procedure Register;
implementation
constructor TRUS_T.Create(AOwner:TComponent);
begin
inherited Create(AOwner);
Width:=100;
Height:=30;
end;
procedure TRUS_T.Paint;
begin
Canvas.Pixels[0,0]:=$000000ff;
Canvas.Pixels[Width-1,Height-1]:=$000000ff;
inherited Paint;
end;
//============================================================================//
procedure Register;
begin
RegisterComponents('RUS Controls',[TRUS_T]);
end;
end.
Очень прошу, помогите пожалуйста!