以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  请教用ListView导航问题  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=187987)

--  作者:13315253800
--  发布时间:2023/8/25 10:22:00
--  请教用ListView导航问题

蓝老师,在帮助文件“主界面导航设计方案-ListView导航”中说右分页用ListView控件对功能进行细分,单击ListView中项目,打开相应的功能窗口,不知在哪儿设置代码?如何设置代码?如我要实现打开具体的功能窗口:

Forms("窗口5").open()
MainTable = Tables("
B")


--  作者:有点蓝
--  发布时间:2023/8/25 10:30:00
--  
ListView的RowActivate事件处理

Dim lvw As WinForm.ListView = e.Form.Controls("ListView1")
Dim 
vr As WinForm.ListViewRow = lvw.Current \'获取ListView的当前行
If 
vr Is Nothing Then \'如果不存在当前行,也就是内有选定任何一行
    Return
End If
Forms(vr.text).open()
MainTable = Tables(
Forms(vr.text).TableName)