以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  求教,窗口表(normal)的选定行是current行吗?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=110524)

--  作者:lxq3736
--  发布时间:2017/12/4 21:59:00
--  求教,窗口表(normal)的选定行是current行吗?
在窗口表中(加了样式),用鼠标点击后记录按样式变化了。但是在currentchanged的事件中 为啥赋值无效(将当前记录赋值到控件上)?求例子!
--  作者:有点蓝
--  发布时间:2017/12/4 22:04:00
--  
贴出你的currentchanged的事件代码!

If e.Table.Current IsNot Nothing andalso Forms("窗口1").Opened Then \'如果Current为Nothing
      Forms("窗口1").Controls("Textbox1").Text = e.Table.Current("第一列")
End If

--  作者:lxq3736
--  发布时间:2017/12/4 22:18:00
--  
currentchanged事件代码(ybg表的事件) 

Dim TB1 As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim TB2 As WinForm.TextBox = e.Form.Controls("TextBox2")
Dim TB3 As WinForm.TextBox = e.Form.Controls("TextBox3")
Dim TB4 As WinForm.TextBox = e.Form.Controls("TextBox4")
Dim CB1 As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim CB2 As WinForm.ComboBox = e.Form.Controls("ComboBox2")


TB2.TEXT = Tables("YGB").CURRENT("YGXM")
TB3.TEXT = Tables("YGB").CURRENT("PHONE1")
TB4.TEXT = Tables("YGB").CURRENT("SFZHM")
cb1.text = Tables("YGB").CURRENT("YGXB")
cb2.text = Tables("YGB").CURRENT("zw")



--  作者:lxq3736
--  发布时间:2017/12/4 22:22:00
--  
测试成功!谢谢老师!