S
SP229
Unregistered / Unconfirmed
GUEST, unregistred user!
在网上下载了TElipsisEdit1.0,在D7下安装不能通过。出现如下提示:
“读取错误AnalyzepackageDlg.OnCreate 无效属性值”
unit Eliedit;
{
An edit control with an elipsis button (...) to the right.
Author: Nikolai Botev Botev
For details see ELIEDIT.TXT
DO NOT distribute this component without ELIEDIT.TXT. If you
make any changes add a description of the work you've done in
this comments section.
Version 1.0 - 6 June 1997
}
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, Buttons, Menus;
type
TElipsisEdit = class(TCustomMemo)
private
{ Private declarations }
protected
{ Protected declarations }
FElipsis: TSpeedButton;
function GetOnClick: TNotifyEvent;
procedure SetOnClick(Value: TNotifyEvent);
procedure UpdateFormatRect;
procedure WMSize(var Msg: TWMSize); message WM_SIZE;
procedure WMSetCursor(var Msg: TWMSetCursor); message WM_SETCURSOR;
procedure CMEnabledChanged(var Msg: TWMNoParams);
message CM_ENABLEDCHANGED;
procedure CreateHandle; override;
public
{ Public declarations }
constructor Create(AOwner: TComponent); override;
published
{ Published declarations }
property Align;
property Alignment;
property AutoSelect;
property AutoSize;
property BorderStyle;
property CharCase;
property Color;
property Ctl3D;
property DragCursor;
property DragMode;
property Enabled;
property Font;
property HideSelection;
property MaxLength;
property OEMConvert;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PasswordChar;
property PopupMenu;
property ReadOnly;
property ShowHint;
property TabOrder;
property TabStop;
property Text;
property Visible;
property OnChange;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnElipsisClick: TNotifyEvent read GetOnClick write SetOnClick;
end;
procedure Register;
implementation
constructor TElipsisEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Height := 24; Width := 150;
WordWrap := False;
WantReturns := False;
FElipsis := TSpeedButton.Create(Self);
with FElipsis do begin
Parent := Self;
Align := alRight;
Caption := '...';
end;
end; { TElipsisEdit.Create }
procedure TElipsisEdit.CreateHandle;
begin
inherited CreateHandle;
UpdateFormatRect;
end; { TElipsisEdit.CreateWindowHandle }
function TElipsisEdit.GetOnClick: TNotifyEvent;
begin
Result := FElipsis.OnClick;
end; { TElipsisEdit.GetOnClick }
procedure TElipsisEdit.SetOnClick(Value: TNotifyEvent);
begin
FElipsis.OnClick := Value;
end; { TElipsisEdit.SetOnClick }
procedure TElipsisEdit.UpdateFormatRect;
var
Rect: TRect;
begin
Rect := ClientRect;
Dec(Rect.Right, FElipsis.Width);
SendMessage(Handle, EM_SETRECTNP, 0, LongInt(@Rect));
end; { TElipsisEdit.UpdateFormatRect }
procedure TElipsisEdit.WMSize(var Msg: TWMSize);
begin
inherited;
FElipsis.Width := FElipsis.Height;
UpdateFormatRect;
end; { TElipsisEdit.WMSize }
procedure TElipsisEdit.WMSetCursor(var Msg: TWMSetCursor);
var
P: TPoint;
begin
GetCursorPos(P);
P := ScreenToClient(P);
if (P.X >= ClientWidth - FElipsis.Width) then
SetCursor(Screen.Cursors[crDefault])
else
inherited;
end; { TElipsisEdit.WMSetCursor }
procedure TElipsisEdit.CMEnabledChanged(var Msg: TWMNoParams);
begin
inherited;
FElipsis.Enabled := Enabled;
end; { TElipsisEdit.CMEnabledChanged }
procedure Register;
begin
RegisterComponents('Smaples', [TElipsisEdit]);
end; { Register }
end.
“读取错误AnalyzepackageDlg.OnCreate 无效属性值”
unit Eliedit;
{
An edit control with an elipsis button (...) to the right.
Author: Nikolai Botev Botev
For details see ELIEDIT.TXT
DO NOT distribute this component without ELIEDIT.TXT. If you
make any changes add a description of the work you've done in
this comments section.
Version 1.0 - 6 June 1997
}
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls, Buttons, Menus;
type
TElipsisEdit = class(TCustomMemo)
private
{ Private declarations }
protected
{ Protected declarations }
FElipsis: TSpeedButton;
function GetOnClick: TNotifyEvent;
procedure SetOnClick(Value: TNotifyEvent);
procedure UpdateFormatRect;
procedure WMSize(var Msg: TWMSize); message WM_SIZE;
procedure WMSetCursor(var Msg: TWMSetCursor); message WM_SETCURSOR;
procedure CMEnabledChanged(var Msg: TWMNoParams);
message CM_ENABLEDCHANGED;
procedure CreateHandle; override;
public
{ Public declarations }
constructor Create(AOwner: TComponent); override;
published
{ Published declarations }
property Align;
property Alignment;
property AutoSelect;
property AutoSize;
property BorderStyle;
property CharCase;
property Color;
property Ctl3D;
property DragCursor;
property DragMode;
property Enabled;
property Font;
property HideSelection;
property MaxLength;
property OEMConvert;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PasswordChar;
property PopupMenu;
property ReadOnly;
property ShowHint;
property TabOrder;
property TabStop;
property Text;
property Visible;
property OnChange;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnElipsisClick: TNotifyEvent read GetOnClick write SetOnClick;
end;
procedure Register;
implementation
constructor TElipsisEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Height := 24; Width := 150;
WordWrap := False;
WantReturns := False;
FElipsis := TSpeedButton.Create(Self);
with FElipsis do begin
Parent := Self;
Align := alRight;
Caption := '...';
end;
end; { TElipsisEdit.Create }
procedure TElipsisEdit.CreateHandle;
begin
inherited CreateHandle;
UpdateFormatRect;
end; { TElipsisEdit.CreateWindowHandle }
function TElipsisEdit.GetOnClick: TNotifyEvent;
begin
Result := FElipsis.OnClick;
end; { TElipsisEdit.GetOnClick }
procedure TElipsisEdit.SetOnClick(Value: TNotifyEvent);
begin
FElipsis.OnClick := Value;
end; { TElipsisEdit.SetOnClick }
procedure TElipsisEdit.UpdateFormatRect;
var
Rect: TRect;
begin
Rect := ClientRect;
Dec(Rect.Right, FElipsis.Width);
SendMessage(Handle, EM_SETRECTNP, 0, LongInt(@Rect));
end; { TElipsisEdit.UpdateFormatRect }
procedure TElipsisEdit.WMSize(var Msg: TWMSize);
begin
inherited;
FElipsis.Width := FElipsis.Height;
UpdateFormatRect;
end; { TElipsisEdit.WMSize }
procedure TElipsisEdit.WMSetCursor(var Msg: TWMSetCursor);
var
P: TPoint;
begin
GetCursorPos(P);
P := ScreenToClient(P);
if (P.X >= ClientWidth - FElipsis.Width) then
SetCursor(Screen.Cursors[crDefault])
else
inherited;
end; { TElipsisEdit.WMSetCursor }
procedure TElipsisEdit.CMEnabledChanged(var Msg: TWMNoParams);
begin
inherited;
FElipsis.Enabled := Enabled;
end; { TElipsisEdit.CMEnabledChanged }
procedure Register;
begin
RegisterComponents('Smaples', [TElipsisEdit]);
end; { Register }
end.