Einzelnen Beitrag anzeigen

scp

Registriert seit: 31. Okt 2003
1.120 Beiträge
 
Delphi 7 Personal
 
#2

Re: Bottom und Right für alle graphischen Componenten

  Alt 7. Jan 2004, 19:01
Da müsstest du dir jeweils eine eigene Komponente ableiten, etwa so:

Delphi-Quellcode:
//...

interface

type
  TMyEdit = class(TEdit)
  protected
    function GetRight : Integer;
    function GetBottom : Integer;
  published
    property Right : Integer; read GetRight;
    property Bottom : Integer; read GetBottom;
  end;

procedure Register;

implementation

function TMyEdit.GetRight : Integer;
begin
  result := Width + Left;
end;

function TMyEdit.GetBottom : Integer;
begin
  result := Height + Top;
end;

procedure Register;
begin
  RegisterComponents('MyCompos', [TMyEdit]);
end;
  Mit Zitat antworten Zitat