以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 新手一段代码求解决错误 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=60991) |
-- 作者:896539326 -- 发布时间:2014/12/4 21:05:00 -- 新手一段代码求解决错误 我想双击给treeview选定的节点名称 赋值给 shdbh 的textbox控件 Dim trv As WinForm.TreeView = e.Form.Controls("客户名称") Dim shdbh As String= e.Form.Controls("shdbh") 是一个textbox的控件 Dim bm As String= trv.SelectedNode.name shdbh=bm 提示这个错误,小白求教 |
-- 作者:有点甜 -- 发布时间:2014/12/4 21:10:00 -- Dim shdbh As String= e.Form.Controls("shdbh").Text |
-- 作者:896539326 -- 发布时间:2014/12/5 8:44:00 -- 甜甜 代码改过之后 双击 节点没有给textbox 赋值呢?为什么? 代码如下 Dim trv As WinForm.TreeView = e.Form.Controls("客户名称") Dim shdbh As String= e.Form.Controls("shdbh").Text Dim bm As String= trv.SelectedNode.name shdbh=bm |
-- 作者:Bin -- 发布时间:2014/12/5 8:51:00 -- 你本来就没有为 它赋值 Dim trv As WinForm.TreeView = e.Form.Controls("客户名称") e.Form.Controls("shdbh").Text=trv.SelectedNode.name |
-- 作者:896539326 -- 发布时间:2014/12/5 9:35:00 -- 谢谢 解决了 |