我现在将dxNavBar控键的view设为了AdvExplorerBarView,这样设置后我再也无法根据我所点的分组内容得到分组名称了。
用dxNavBar1.ActiveGroup.Caption这个方法属性一直都是得到第一个组的名称。我想根据我所点选的分组内容来得到分组的名称该怎么办呀????注:dxNavBar1.ActiveGroup.Caption在dxNavBar控键的view设为XP1View的时候可以取得不同分组的名称。但是在view设为了AdvExplorerBarView就不行了。
用dxNavBar1.ActiveGroup.Caption这个方法属性一直都是得到第一个组的名称。我想根据我所点选的分组内容来得到分组的名称该怎么办呀????注:dxNavBar1.ActiveGroup.Caption在dxNavBar控键的view设为XP1View的时候可以取得不同分组的名称。但是在view设为了AdvExplorerBarView就不行了。
解决方案 »
- 用ShellExecute打开记事本后,如何保存后再执行下一行DELPHI代码
- 用程序登录服务器!急急
- 有一字符串,包括完整的文件路径和文件名,例如“c:\temp\hah.doc”这样的字符串。如何获取其中的文件名“hah''不要后缀名的?
- 一段感想,一段思考,希望大家一起讨论一下,能给我一些引导
- 使用Delphi的Ado操作Informix
- 我该怎么办?是去华为做软件测试还是留下来搞开发?
- 聊天测试程序,在局域网中没问题,但在INTER网中连不通,有公网IP。
- 探讨方法
- 如何更新记录,这么简单的问题都没有能帮我吗?
- 请问一下winzip等压缩软件的基本压缩原理 ?
- 怎么实现论坛贴吧自动发贴
- 关于pngimage控件加入透明图片移动后又留影问题
dxNavBar.OnGroupClick函数中获取当前点击的分组名称.
eg:
procedure TForm1.dxNavBar1GroupClick(Sender: TObject;
AGroup: TdxNavBarGroup);
begin
ShowMessage(AGroup.Caption);
end;如果想在点击Item的时候获取其所属分组的名称,则在Item的OnClick事件中编写循环遍历代码
procedure TForm1.dxnvbrtmNavBar1Item2Click(Sender: TObject);
var
i,j: integer;
begin
for i := 0 to dxNavBar1.Groups.Count -1 do
begin
for j := 0 to dxNavBar1.Groups[i].LinkCount -1 do
begin
if (dxNavBar1.Groups[i].Links[j].Item.Caption) =
(sender as TdxNavBarItem).Caption then
begin
showmessage(dxNavBar1.Groups[i].caption);
Exit;
end;
end;
end;
end;
dxNavBar.OnGroupClick函数中获取当前点击的分组名称.
eg:
procedure TForm1.dxNavBar1GroupClick(Sender: TObject;
AGroup: TdxNavBarGroup);
begin
ShowMessage(AGroup.Caption);
end;如果想在点击Item的时候获取其所属分组的名称,则在Item的OnClick事件中编写循环遍历代码
procedure TForm1.dxnvbrtmNavBar1Item2Click(Sender: TObject);
var
i,j: integer;
begin
for i := 0 to dxNavBar1.Groups.Count -1 do
begin
for j := 0 to dxNavBar1.Groups[i].LinkCount -1 do
begin
if (dxNavBar1.Groups[i].Links[j].Item.Caption) =
(sender as TdxNavBarItem).Caption then
begin
showmessage(dxNavBar1.Groups[i].caption);
Exit;
end;
end;
end;
end;