constructor TComboButton.Create(AOwner: TComponent);
var
mButtonsWidth:integer;
begin
inherited;
with TDBListCombo (Parent.Parent) do
mButtonsWidth := Width;
showmessage(inttostr(mButtonsWidth)); //****************
// Left := mButtonsWidth ;
end;以上代码运行的时候出现如下错误:
Exception EAccessViolation in module Project1.exe at 00086F80.
Access violation at address 0048F80 in module 'Project1.exe'.Read of address 00000024.
错误行在带星号的那行,如果注释该行则没有错误,请问这是什么原因呢?
解决方案 »
- access问题,简单,在线等待
- 如何获得当前程序运行路径的问题
- 如何用quickreport实现多个表的打印和统计?急啊!
- MS_SQL数据库用DOStoredProc怎么得到返回值
- 如何设窗体的可见性
- 如何在DBGrid或StringGrid的某列中显示checkBox
- 从现CSDN,请多多关照,版主请不要删!
- 如何关闭winexec函数调出的可执行程序?
- 关于idhhtp post用法.........详细者有分
- 谁有平面图设计开发经验(象CAD)?或知道那有此VCL下载?
- 求《Delphi 7项目开发实践》详细目录的电子版
- $$$$$$$$中科慧创软件公司招Delphi程序员(成都工作)$$$$$$$$$$$$$$
var
mButtonsWidth:integer;
begin
inherited;
with TDBListCombo (Parent.Parent) do
mButtonsWidth := Width;
// showmessage(inttostr(mButtonsWidth)); //****************
Left := mButtonsWidth ;
end;
var
mButtonsWidth:integer;
begin
inherited;
with TDBListCombo (Parent.Parent) do
begin
mButtonsWidth := Width;
// showmessage(inttostr(mButtonsWidth)); //****************
Left := mButtonsWidth ;
end;
end;
begin
inherited;
FBtnControl := TWinControl.Create(Self);
FBtnControl.Width := 17;
FBtnControl.Height := 17;
FBtnControl.Visible := True;
FBtnControl.Parent := Self;
FButton := TComboButton.Create(self);
FButton.Parent := FBtnControl;
FButton.Top := 1 ;
FButton.Left := 1 ;
FBtnControl.Width := 17;
FBtnControl.Height := 17;
FButton.Visible := True ;
FButton.SetBounds(0, 0, FBtnControl.Width, FBtnControl.Height);
FButton.Glyph.Handle := LoadBitmap(0, PChar(32738));
FGrid := TPopupGrid.Create(Self);
FGrid.Parent := Self;
FGrid.Visible := False;
FGrid.Width := Width;
Height := 25;
FTitleOffset:=0;
// FDropDownCount := 8;end;以上的代码是对组件的定义,
TComboButton的parent.parent 是指TDBListCombo还是FBtnControl?我自己都糊涂了。
procedure TComboButton.MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
begin
with TDBListCombo (Parent.Parent) do
DropDown;
end;
可惜TCustomEdit类好象没有resize事件啊?
procedure show;override;
但得到错误提示:
Cannot override a static method
这该如何解决呢?用show方法能否解决问题?等待ing,等待ing,等待ing,等待ing,等待ing,等待ing,
等待ing,等待ing,等待ing,等待ing,等待ing,等待ing,
等待ing,等待ing,等待ing,等待ing,等待ing,等待ing,
等待ing,等待ing,等待ing,等待ing,等待ing,等待ing,