G gnoc Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-30 #1 请问在DELPHI中知道子菜单的name或caption如何能 在程序运行中找到它们并把它的VISIBLE变成FALSE
M mikegong Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-30 #2 你要知道他在其中的位置 比如说。。 FileItem.Items.Caption := 'File'
O onlyonekgx Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-30 #3 有一个函数大概对你有用: FindComponent
天 天什 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-30 #4 for i:=0 to componentcount-1do begin if ((components is TMainMenu)and(TMainMenu.(Components).name='name')) then TMainMenu.(Components).visible := false; end;
for i:=0 to componentcount-1do begin if ((components is TMainMenu)and(TMainMenu.(Components).name='name')) then TMainMenu.(Components).visible := false; end;
O onlyonekgx Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-30 #5 TMenuItem(FindComponent('name')).visible:=false;
风 风中流云 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-30 #7 mnuItem := TMenuItem(mainmenu.owner.findcomponent(trim(fields[0].asstring))); if mnuItem<>nil then mnuItem.enabled:=false;
mnuItem := TMenuItem(mainmenu.owner.findcomponent(trim(fields[0].asstring))); if mnuItem<>nil then mnuItem.enabled:=false;