以文本方式查看主题
- Foxtable(狐表) (http://foxtable.net/bbs/index.asp)
-- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2)
---- [求助]狐爸,请进 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=21058)
|
-- 作者:xiaoqiwei
-- 发布时间:2012/6/29 2:03:00
-- [求助]狐爸,请进
请问狐爸,我这代码哪里出错了?
For Each nm As Windows.Forms.Control In Forms("订单管理").Controls("Panel3").basecontrol.controls If typeof nm Is Windows.Forms.TextBox Then Dim c As Windows.Forms.TextBox = nm c.Text = e.Table.Current(c.name) End If Next
提示一下错误:
此主题相关图片如下:未命名.jpg
|
-- 作者:blackzhu
-- 发布时间:2012/6/29 7:16:00
--
你这个代码写的 真是,不做解释.
|
-- 作者:程兴刚
-- 发布时间:2012/6/29 7:32:00
--
路过!
|
-- 作者:狐狸爸爸
-- 发布时间:2012/6/29 8:51:00
--
c.Text = e.Table.Current(c.name)
改为:
c.Value = e.Table.Current(c.name)
|
-- 作者:xiaoqiwei
-- 发布时间:2012/6/29 10:36:00
--
以下是引用狐狸爸爸在2012-6-29 8:51:00的发言:
c.Text = e.Table.Current(c.name)
改为:
c.Value = e.Table.Current(c.name)
狐爸,改了后,按确定就提示
此主题相关图片如下:未命名.jpg
|
-- 作者:狐狸爸爸
-- 发布时间:2012/6/29 10:47:00
--
For Each nm As WinForm.Control In e.Form.Controls If typeof nm Is Winform.TextBox Dim c As Winform.TextBox = nm c.value = Tables("表A").Current(c.name) End If Next
|
-- 作者:xiaoqiwei
-- 发布时间:2012/6/29 10:49:00
--
以下是引用狐狸爸爸在2012-6-29 10:47:00的发言: For Each nm As WinForm.Control In e.Form.Controls If typeof nm Is Winform.TextBox Dim c As Winform.TextBox = nm c.value = Tables("表A").Current(c.name) End If Next
狐爸,我是想知判断 Panel3 控件里面的控件,而不是全部控件
|
-- 作者:狐狸爸爸
-- 发布时间:2012/6/29 10:56:00
--
For Each nm As WinForm.Control In e.Form.Controls("Panel3").Children If typeof nm Is Winform.TextBox Dim c As Winform.TextBox = nm c.value = Tables("表A").Current(c.name) End If Next
|