Foxtable(狐表)用户栏目专家坐堂 → [求助]keypress listview


  共有2813人关注过本帖平板打印复制链接

主题:[求助]keypress listview

帅哥哟,离线,有人找我吗?
blsu33
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:九尾狐 帖子:2928 积分:20178 威望:0 精华:0 注册:2012/2/3 17:45:00
[求助]keypress listview  发帖心情 Post By:2015/12/31 10:11:00 [只看该作者]

老师,

For i1 As Integer = 2 To 3     '希望只循环2-5页面中的部分
                                For Each bt As object In tab.TabPages(i1).Children
                                    If  Typeof bt Is WinForm.ListView  Then '判断控件是否是目录树
                                        Dim lvw As WinForm.ListView = Forms("通用目录树").Controls(bt.name)
                                        If e.KeyCode = Keys.Up Then
                                            lvw.Position = lvw.Position - 1
                                            e.Cancel = True
                                        ElseIf e.KeyCode = Keys.Down Then
                                            lvw.Position = lvw.Position + 1
                                            e.Cancel = True
                                        ElseIf e.KeyCode = Keys.Enter Then
                                            If lvw.Current IsNot Nothing Then
                                                For i=0 To Parts1.Length-1
                                                    Tables(ary(0)).Current(Parts1(i)) = lvw.Current(Parts(i))
                                                Next
                                            End If
                                        End If
                                    End If
                                Next
                            Next


 回到顶部
总数 16 1 2 下一页