procedure TForm1.FormCreate(Sender: TObject);
begin
DBNavigator1.Hints.Text :=
'最前一条'#13#10 +
'前一条'#13#10 +
'后一条'#13#10 +
'最后一条'#13#10 +
'插入记录'#13#10 +
'删除记录'#13#10 +
'编辑记录'#13#10 +
'提交编辑'#13#10 +
'取消编辑'#13#10 +
'刷新数据'#13#10;
DBNavigator1.ShowHint := True;
end;
begin
DBNavigator1.Hints.Text :=
'最前一条'#13#10 +
'前一条'#13#10 +
'后一条'#13#10 +
'最后一条'#13#10 +
'插入记录'#13#10 +
'删除记录'#13#10 +
'编辑记录'#13#10 +
'提交编辑'#13#10 +
'取消编辑'#13#10 +
'刷新数据'#13#10;
DBNavigator1.ShowHint := True;
end;
其实你是想要个有文字说明的数据库操作按钮,对不对,你可以自己用按钮来实现啊,只要在窗体上添加按钮,然后在按钮的onclick事件中添加相应的数据库操作代码就可以了,比如table.next、table.last、table.edit等等,在按钮上加上图片和文字就可以了啊!
http://www.csdn.net/Expert/TopicView1.asp?id=562753
var
I: Integer;
begin
for I := 0 to DBNavigator1.ComponentCount - 1 do
if DBNavigator1.Components[I] is TNavButton then begin
case TNavButton(DBNavigator1.Components[I]).Index of
nbFirst: TNavButton(DBNavigator1.Components[I]).Caption := '首笔';
nbPrior: TNavButton(DBNavigator1.Components[I]).Caption := '上笔';
nbNext: TNavButton(DBNavigator1.Components[I]).Caption := '下笔';
nbLast: TNavButton(DBNavigator1.Components[I]).Caption := '末笔';
nbInsert: TNavButton(DBNavigator1.Components[I]).Caption := '新增';
nbDelete: TNavButton(DBNavigator1.Components[I]).Caption := '删除';
nbEdit: TNavButton(DBNavigator1.Components[I]).Caption := '修改';
nbPost: TNavButton(DBNavigator1.Components[I]).Caption := '存档';
nbCancel: TNavButton(DBNavigator1.Components[I]).Caption := '取消';
nbRefresh: TNavButton(DBNavigator1.Components[I]).Caption := '刷新';
end;
end;
end;
var
I: Integer;
begin
with DBNavigator1 do for I := 0 to ComponentCount - 1 do
if Components[I] is TNavButton then begin
case TNavButton(Components[I]).Index of
nbFirst: TNavButton(Components[I]).Caption := '首笔';
nbPrior: TNavButton(Components[I]).Caption := '上笔';
nbNext: TNavButton(Components[I]).Caption := '下笔';
nbLast: TNavButton(Components[I]).Caption := '末笔';
nbInsert: TNavButton(Components[I]).Caption := '新增';
nbDelete: TNavButton(Components[I]).Caption := '删除';
nbEdit: TNavButton(Components[I]).Caption := '修改';
nbPost: TNavButton(Components[I]).Caption := '存档';
nbCancel: TNavButton(Components[I]).Caption := '取消';
nbRefresh: TNavButton(Components[I]).Caption := '刷新';
end;
end;
end;
还可以加图标呢:
Tspeedbutton(dbnavigator.controls[i]).glyph:=.......我以前做过!很方便的!!!!!
最简单的方法就是从网上下个控件吧!
32位DELPHI深度历险的网站上有。