我要得到如下功能?某一个mainmenu.item.items[i].item[j].items[k]其中某一处我要得到字符串I+J+K,这样可以用来进行功能定位与外部属性载入.
如:mainmenu.item.items[0].item[0].items[2]处可得到'002'字符串.
通用性菜单,事先不知,动态载入象treeview就具有level与parent请哪位大虾帮忙,要交毕业设计了.还没有完成.
如:mainmenu.item.items[0].item[0].items[2]处可得到'002'字符串.
通用性菜单,事先不知,动态载入象treeview就具有level与parent请哪位大虾帮忙,要交毕业设计了.还没有完成.
解决方案 »
- 请问如何得到上月的一号以及上月的最后一天.100分,谢谢
- 问一下关于团队做DELPHI项目的问题
- 求《Delphi下深入Windows核心编程》电子版及源码
- 简单问题:infomessage 这个函数怎么用法?
- 请问哪有《DELPHI5.x分布式多层应用系统编》的附书源码下载? ——不是书,是源码!
- 字符转换的问题??急用?
- 怎样才能能捕获pageup,pagedown或up,down,left和ringt等功能键的键值吗?
- 我是新手,一个简单的问题(在线等待)
- 我在筛选过的DataSet中(用Filter),使用GetBookMark,GotoBookMark时报错
- win2000+delphi6.0+sql Server2000 更新时出问题(query+UpdateSQL)
- 关于Msn标签的问题
- 98系统开发的软件,在xp中运行。当用户使用CTRL+C、CTRL+V复制粘贴时出现乱码!
begin
Result := '';
while Assigned(mMenuItem) do
begin
if Assigned(mMenuItem.Parent) then
Result := Result + IntToStr(mMenuItem.MenuIndex)
else Result := Result + '0';
mMenuItem := mMenuItem.Parent;
end;
end;procedure TForm1.MenuItemClick(Sender: TObject);
begin
Caption := ScanMenuItem(TMenuItem(Sender));
end;
var I:integer;
begin
with value do
begin
for i:=0 to Count-1 do
begin
showmessage(getlevel(value.Items[i]));
if items[i].Count>0 then
SaveItemsToList(items[i]); //递归查找有没有子菜单
end;
end;
end;function TmenuDesign.getlevel(value:TmenuItem):string;
var i:integer;
s:string;
begin
if Assigned(value.Parent) then
begin
s:=getlevel(value.Parent)+inttostr(value.MenuIndex);
end else
if value.MenuIndex<>-1 then
s:=inttostr(value.MenuIndex);
result:=s;
end;