Chinaunix首页 | 论坛 | 博客
  • 博客访问: 16495823
  • 博文数量: 5645
  • 博客积分: 9880
  • 博客等级: 中将
  • 技术积分: 68081
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-28 13:35
文章分类

全部博文(5645)

文章存档

2008年(5645)

我的朋友

分类:

2008-04-28 20:47:45

下载本文示例代码
Published declarations } end; procedure Register; implementation procedure Register; begin RegisterComponents("Additional", [TDBPanel]); end; { 为第I字段增加提示信息的方法} procedure TDBPanel.AddHits(ItemIndex: Integer; Hits: array of string); var m,n,i: Integer; begin n := Length(Editors); m := Length(Hits); if ItemIndex$#@60;n then begin for i:=0 to m-1 do Editors[ItemIndex].Items.Add(Hits[i]); end; end; procedure TDBPanel.AKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (Sender is TDBComboBox) then begin case Key of VK_Next: (Sender as TDBComboBox).DataSource.DataSet.Next; VK_PRIOR: (Sender as TDBComboBox).DataSource.DataSet.Prior; end; end; end; procedure TDBPanel.AKeyPress(Sender: TObject; var Key: Char); begin if (Sender is TDBComboBox) then begin if Key=#13 then (Owner as TForm).Perform(WM_NEXTDLGCTL, 0, 0); end; end; procedure TDBPanel.ClearHits(ItemIndex: Integer); var n: Integer; begin n := Length(Editors); if ItemIndex$#@60;n then Editors[ItemIndex].Items.Clear; end; constructor TDBPanel.Create(AOwner: TComponent); begin Inherited Create(AOWner); FLeft :=10; FTop := 10; maxTextLen := 100; maxLabelLen := 100; FLineHeight := 15; end; 共3页。 1 2 3 8 : Published declarations } end; procedure Register; implementation procedure Register; begin RegisterComponents("Additional", [TDBPanel]); end; { 为第I字段增加提示信息的方法} procedure TDBPanel.AddHits(ItemIndex: Integer; Hits: array of string); var m,n,i: Integer; begin n := Length(Editors); m := Length(Hits); if ItemIndex$#@60;n then begin for i:=0 to m-1 do Editors[ItemIndex].Items.Add(Hits[i]); end; end; procedure TDBPanel.AKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (Sender is TDBComboBox) then begin case Key of VK_Next: (Sender as TDBComboBox).DataSource.DataSet.Next; VK_PRIOR: (Sender as TDBComboBox).DataSource.DataSet.Prior; end; end; end; procedure TDBPanel.AKeyPress(Sender: TObject; var Key: Char); begin if (Sender is TDBComboBox) then begin if Key=#13 then (Owner as TForm).Perform(WM_NEXTDLGCTL, 0, 0); end; end; procedure TDBPanel.ClearHits(ItemIndex: Integer); var n: Integer; begin n := Length(Editors); if ItemIndex$#@60;n then Editors[ItemIndex].Items.Clear; end; constructor TDBPanel.Create(AOwner: TComponent); begin Inherited Create(AOWner); FLeft :=10; FTop := 10; maxTextLen := 100; maxLabelLen := 100; FLineHeight := 15; end; 共3页。 1 2 3 8 : 下载本文示例代码


Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下Delphi数据库输入控件DBPanel的实现下
阅读(239) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~