Foxtable(狐表)用户栏目专家坐堂 → treeview的错误


  共有2070人关注过本帖树形打印复制链接

主题:treeview的错误

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


加好友 发短信
等级:六尾狐 帖子:1446 积分:10688 威望:0 精华:0 注册:2014/8/13 16:19:00
treeview的错误  发帖心情 Post By:2020/4/15 16:34:00 [只看该作者]

代码:    Dim td As WinForm.TreeNode
    td = tvw1.nodes(Index)

下面这个错误。啥错误?

---------------------------
错误
---------------------------
编译错误:Overload resolution failed because no accessible 'Item' can be called without a narrowing conversion:
    'Public ReadOnly Default Property Item(Name As String) As WinForm.TreeNode': Argument matching parameter 'Name' narrows from 'Long' to 'String'.
    'Public ReadOnly Default Property Item(Index As Integer) As WinForm.TreeNode': Argument matching parameter 'Index' narrows from 'Long' to 'Integer'.



错误代码:td = tvw1.nodes(Index)
---------------------------
确定   
---------------------------


 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107813 积分:548416 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/4/15 16:41:00 [只看该作者]

错误提示意思是传入的参数类型不对,需要字符型string或者整数integer,但是传入了长整数long。
td = tvw1.nodes(cint(Index))

 回到顶部