I
ibmdeskstar
Unregistered / Unconfirmed
GUEST, unregistred user!
---------------------- 以下程序 ------------------------
unit TMyComponent;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, ComCtrls, QStdCtrls;
[red]type THeightCount = 0..20;
// 这里的20我是希望能否随着TMyMemo或者它的实例的Height值而改变,也就是说
// 如果Height为44,则 THeightCount = 0..44
THeightCountSet = set of THeightCount;[/red]
type
TMyMemo = class(TMemo)
private
FHeights : THeightCountSet;
public
constructor Create(AOwner:TComponent);override;
published
property Heights : THeightCountSet
read FHeights write FHeights default [];
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Samples', [TMyComponent]);
end;
{ TMyComponent }
end.
请教大家有没有好的解决方法?
unit TMyComponent;
interface
uses
Windows, Messages, SysUtils, Classes, Controls, ComCtrls, QStdCtrls;
[red]type THeightCount = 0..20;
// 这里的20我是希望能否随着TMyMemo或者它的实例的Height值而改变,也就是说
// 如果Height为44,则 THeightCount = 0..44
THeightCountSet = set of THeightCount;[/red]
type
TMyMemo = class(TMemo)
private
FHeights : THeightCountSet;
public
constructor Create(AOwner:TComponent);override;
published
property Heights : THeightCountSet
read FHeights write FHeights default [];
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Samples', [TMyComponent]);
end;
{ TMyComponent }
end.
请教大家有没有好的解决方法?