以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  求助 动态多行TextBox,  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=101311)

--  作者:jackyfashion
--  发布时间:2017/5/27 23:36:00
--  求助 动态多行TextBox,

老师:

  您好!

动态多行TextBox控件

Dim t As Table = Tables("表A")

For  i As Integer=0 To t.rows.count-1
    Dim txt As WinForm.TextBox
    txt = e.Form.CreateControl("TextBox" & i, ControlTypeEnum.TextBox)
    txt.MultiLine = True
    txt.text = "品   牌: " & t.rows(i)("pan") & "主  题:" & t.rows(i)("zu")  & "季节:" & t.rows(i)("zz")
    txt.BorderStyle = BorderStyle. None
    txt.BackColor = Color.FromARGB(25, 25, 25)
    txt.ForeColor = Color.FromARGB(250, 250, 250)
    txt.Width = 300
    txt.Height = 20
    txt.Left = 300*i+10
    txt.Top = 285
    txt.ReadOnly = BooleanEnum.False
    e.Form.Controls("hsr").AddControl(txt)
Next

请教老师,怎样把红色那行的一列一行显示在多行的文本框?  兰色那行代码是不是少了代码?显示不了多行?

谢谢!

[此贴子已经被作者于2017/5/27 23:43:23编辑过]

--  作者:有点色
--  发布时间:2017/5/28 9:33:00
--  

你要设置控件的高度啊

 

Dim t As Table = Tables("表A")

For  i As Integer=0 To t.rows.count-1
    Dim txt As WinForm.TextBox
    txt = e.Form.CreateControl("TextBox" & i, ControlTypeEnum.TextBox)
    txt.MultiLine = True
    txt.text = "品   牌: " & t.rows(i)("pan") & "主  题:" & t.rows(i)("zu")  & "季节:" & t.rows(i)("zz")

    txt.BorderStyle = BorderStyle. None
    txt.BackColor = Color.FromARGB(25, 25, 25)
    txt.ForeColor = Color.FromARGB(250, 250, 250)
    txt.Width = 300
    txt.Height = 100
    txt.Left = 300*i+10
    txt.Top = 285
    txt.ReadOnly = BooleanEnum.False
    e.Form.Controls("hsr").AddControl(txt)
Next


--  作者:jackyfashion
--  发布时间:2017/5/28 20:51:00
--  

谢谢老师!

端午节快乐!