导航:
论坛 -> DELPHI技术
斑竹:liumazi,sephil
作者:
2003/10/18 10:34:13
标题:
加入我的收藏
楼主:
请问弹出菜单怎么与DBNavigator控件的各个按钮关联起来?比如,菜单的删除项怎么与DBNavigator中的delete按钮关联? 请指教.
----------------------------------------------
-
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2003/10/18 13:18:46
1楼:
如果是主菜单onclick事件 如果是popupmenu则是onpopup事件即可
----------------------------------------------
作者:
2003/10/18 20:14:30
2楼:
可以给代码看看吗?
----------------------------------------------
-
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2003/10/18 22:36:34
3楼:
procedure TForm1.PopupMenu1Popup(Sender: TObject); begin a1.Enabled :=DBNavigator1.Controls[0].Enabled ; b1.Enabled :=DBNavigator1.Controls [2].Enabled ; end; procedure TForm1.Button1Click(Sender: TObject); begin showmessage(inttostr( DBNavigator1.ControlCount ));//10 end;
----------------------------------------------
作者:
bios (阿贡)
★☆☆☆☆
-
盒子中级会员
2003/10/18 22:39:59
4楼:
procedure abc; begin showmessage('abc'); end; procedure TForm1.DBNavigator1Click(Sender: TObject; Button: TNavigateBtn); begin case Button of nbFirst : abc; end; end; procedure TForm1.a1Click(Sender: TObject); begin abc; end;
----------------------------------------------
作者:
2003/10/19 16:27:32
5楼:
谢谢大家.
----------------------------------------------
-