TElipsisEdit控件在D7安装出错!请大家帮忙!不好意思只有这点分了。 ( 积分: 40 )

  • 主题发起人 主题发起人 SP229
  • 开始时间 开始时间
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.
 
没人理,自已顶一下
 
都这么久了,还没人答,再顶一下
 
还没人答再顶一下。
 
是不是问题有点难啊
 
我一般都是自己做组合控件的,你可以组合一个呀,用 edit+speedbutton
比你这样好操作多了
 
遇到问题,自己不会,就想把它搞明白,(学DELPHI是业余爱好,很多都不懂)如果你能解决我会很感激的。
 
我也没有遇到过这种问题,你可以试着看看 tcustomMemo 的源码呀
 
你把上面的代码复制下去在你机上试试,我是没办法搞懂它。
 
没有问题。控件不含 AnalyzepackageDlg。估计是你的 .dpk 文件包含了其它有问题的文件。
 
我还没搞定,不知问题出在哪?明天试试
 
如果还搞不定,留下联系办法,我发给你试试。
 
eastmark12@163.com
 
我装有一个控件,sailprintd7,
 
你用我发给你的控件包试试,我试过,没问题。
 
真是这个控件的问题,删除后就没事了。最后重新把它装上,两个控件都可以用了,多谢你了,kaida给你加分。
 

Similar threads

I
回复
0
查看
527
import
I
I
回复
0
查看
625
import
I
I
回复
0
查看
508
import
I
I
回复
0
查看
467
import
I
I
回复
0
查看
875
import
I
后退
顶部