DELPHI自带的那个添加删除前一个后一个得那个控件不太好用,谁有一个中文并带有图标的这类控件么? DELPHI自带的那个添加删除前一个后一个得那个控件不太好用,谁有一个中文并带有图标的这类控件么?DELPHI里面的太不直观,如果要自己些代码改怎么些呢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不用别的控件,只要将Delphi自带的TDBNavigator控件稍加改造就行了。1.改造提示信息。 修改DBNavigator1的提示信息即Hints属性为: 第一条 上一条 下一条 最后一条 添加记录 删除记录 修改记录 保存记录 取消编辑 刷新数据2.改造DBNavigator1标题。处理窗体的创建事件,修改各个按钮的标题:procedure TForm1.FormCreate(Sender: TObject);const a:array[0..9] of string =('最前','向前','向后','最后','添加', '删除','修改','保存','取消','刷新');var i:integer;begin for i:=0 to DBNavigator1.ControlCount-1 do TNavButton(DBNavigator1.Controls[i]).Caption:=a[i];end; 现在,界面上的按钮标题和提示信息已经全部变成中文的了,接下来就是要处理按钮执行后的对话框和异常信息框了。剩下的就交给你吧!怎么样,解决了吧?! 使用Image Editor 打开delphi6\lib\qdbctrls 文件,剩下的事情就是你的美术功底了!:) 更改DBNavigator中的图片procedure ChangeDBNavImage(DBnav: TDbNavigator); var i: Integer; tempGlyph: TBitmap; ExePath: string; begin ExePath := ExtractFilePath(Application.ExeName); tempGlyph := TBitmap.Create; try with DBNav do begin for i := 0 to ControlCount - 1 do begin if Controls[i].ClassName = 'TNavButton' then begin case TNavButton(Controls[i]).Index of nbFirst: tempGlyph.LoadFromFile(ExePath + 'first.bmp'); nbPrior: tempGlyph.LoadFromFile(ExePath + 'previous.bmp'); nbNext: tempGlyph.LoadFromFile(ExePath + 'Next.bmp'); nbLast: tempGlyph.LoadFromFile(ExePath + 'Last.bmp'); nbInsert: tempGlyph.LoadFromFile(ExePath + 'Insert.bmp'); nbDelete: tempGlyph.LoadFromFile(ExePath + 'Delete.bmp'); nbEdit: tempGlyph.LoadFromFile(ExePath + 'Edit.bmp'); nbPost: tempGlyph.LoadFromFile(ExePath + 'Post.bmp'); nbCancel: tempGlyph.LoadFromFile(ExePath + 'Cancel.bmp'); nbRefresh: tempGlyph.LoadFromFile(ExePath + 'Refresh.bmp'); end; TNavButton(Controls[i]).Glyph := tempGlyph; end; end; end; finally tempGlyph.Free; end; end; procedure TForm1.Button1Click(Sender: TObject); begin ChangeDBNavImage(DBNavigator1); end; 虽然是个老问题,还是基础没有打好,各位高人不要见谅! qtintf.dll这个文件害我不浅啊! vbscript在网页上调用delphi写的activeform的ocx控件出现的问题 高分请问各位高手,COM+的客户代理程序在WIN98下怎么安装? 我部门招聘,高手请进 who 掺 为什么多层结构的主从表无法刷新子表? 判断语句超时 请问怎么判断richedit控件中的内容已到尾部? 如何使listbox 的listitem多行显示,就象oicq的聊天纪录显示的那样? DELPHI里面数据库赋值的问题!!!!!!!!!!!!!!!! 一个很容易得分的问题,不信来瞧瞧!(在线等待)
1.改造提示信息。
修改DBNavigator1的提示信息即Hints属性为:
第一条
上一条
下一条
最后一条
添加记录
删除记录
修改记录
保存记录
取消编辑
刷新数据
2.改造DBNavigator1标题。
处理窗体的创建事件,修改各个按钮的标题:
procedure TForm1.FormCreate(Sender: TObject);
const a:array[0..9] of string
=('最前','向前','向后','最后','添加',
'删除','修改','保存','取消','刷新');
var
i:integer;
begin
for i:=0 to DBNavigator1.ControlCount-1 do
TNavButton(DBNavigator1.Controls[i]).Caption:=a[i];
end;
现在,界面上的按钮标题和提示信息已经全部变成中文的了,接下来就是要处理按钮执行后的对话框和异常信息框了。剩下的就交给你吧!
怎么样,解决了吧?!
procedure ChangeDBNavImage(DBnav: TDbNavigator);
var
i: Integer;
tempGlyph: TBitmap;
ExePath: string;
begin
ExePath := ExtractFilePath(Application.ExeName);
tempGlyph := TBitmap.Create;
try
with DBNav do
begin
for i := 0 to ControlCount - 1 do
begin
if Controls[i].ClassName = 'TNavButton' then
begin
case TNavButton(Controls[i]).Index of
nbFirst: tempGlyph.LoadFromFile(ExePath + 'first.bmp');
nbPrior: tempGlyph.LoadFromFile(ExePath + 'previous.bmp');
nbNext: tempGlyph.LoadFromFile(ExePath + 'Next.bmp');
nbLast: tempGlyph.LoadFromFile(ExePath + 'Last.bmp');
nbInsert: tempGlyph.LoadFromFile(ExePath + 'Insert.bmp');
nbDelete: tempGlyph.LoadFromFile(ExePath + 'Delete.bmp');
nbEdit: tempGlyph.LoadFromFile(ExePath + 'Edit.bmp');
nbPost: tempGlyph.LoadFromFile(ExePath + 'Post.bmp');
nbCancel: tempGlyph.LoadFromFile(ExePath + 'Cancel.bmp');
nbRefresh: tempGlyph.LoadFromFile(ExePath + 'Refresh.bmp');
end;
TNavButton(Controls[i]).Glyph := tempGlyph;
end;
end;
end;
finally
tempGlyph.Free;
end;
end; procedure TForm1.Button1Click(Sender: TObject);
begin
ChangeDBNavImage(DBNavigator1);
end;