以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]移动开发 多行文本框设计-已解决 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=121716) |
-- 作者:shenyl0211 -- 发布时间:2018/7/12 9:32:00 -- [求助]移动开发 多行文本框设计-已解决 下列代码中,证件名称属于基本信息,但证件数量较多,所以允许200个字符,这就需要采用多行文本框。 请问高手:如果证件名称仍在基本信息组下,能否实现多行文本框?怎么实现?谢谢! With wb.AddInputGroup("form1","ipg1","基本信息") With .AddInput("申请部门","申请部门","text") .value=department \'登录时从人员管理表获取的部门名称 .readonly=True End With .AddInput("证件名称","证件名称","text") .AddInput("用途","用途","text") .AddInput("拟用城市","拟用城市","text") .AddInput("拟借日期","拟借日期","date") .AddInput("拟用日期","拟用日期","date") .AddInput("拟还日期","拟还日期","date") End With With wb.AddInputGroup("form1","ipg2","备注") With .AddTextArea("备注",5)\'多行文本框,设为5行 .Placeholder="100字以内" .class = "red" End With End With 解决办法(9楼甜版的方法更好): With .AddInput("申请部门","申请部门","text") .value=department .readonly=True End With With .AddInputCell("ic1") \'通过InputCell增加输入框 .AddLabel("证件名称","证件名称",0) \'增加标签,0显示在左边 End With With .AddTextArea("证件名称",10)\'多行文本框,设为10行 .Placeholder="200字以内" .class = "red" End With .AddInput("用途","用途","text") [此贴子已经被作者于2018/7/12 15:22:43编辑过]
|
-- 作者:有点甜 -- 发布时间:2018/7/12 9:42:00 -- AddTextArea没有左边的标签提示的。你可以把AddTextArea直接添加进去,然后设置Placeholder提示即可。 |
-- 作者:有点甜 -- 发布时间:2018/7/12 9:44:00 -- 如果确实需要多行文本,而且左边需要标签,可以用嵌入html代码的方式加入控件,如
http://www.foxtable.com/mobilehelp/scr/0097.htm
|
-- 作者:shenyl0211 -- 发布时间:2018/7/12 10:32:00 -- 甜版:用wb.InsertHTML("证件名称"),结果“证件名称”被放到最后了
|
-- 作者:有点甜 -- 发布时间:2018/7/12 10:39:00 -- wb.InsertHTML("ipg1", "<label>11122333</label>") |
-- 作者:shenyl0211 -- 发布时间:2018/7/12 10:50:00 -- 甜版:现在反而不见“证件名称”了 wb.AppendHTML("<style>.red{color:red;}</style>", True) wb.InsertHTML("<meta name=\'viewport\' c>") wb.AddForm("","form1","增加" & dtname & ".htm") With wb.AddInputGroup("form1","ipg1","基本信息") With .AddInput("申请部门","申请部门","text") .value=department .readonly=True End With wb.InsertHTML("ipg1", "<label>证件名称</label>") With .AddTextArea("证件名称",10)\'多行文本框,设为10行 .Placeholder="200字以内" .class = "red" End With .AddInput("用途","用途","text") .AddInput("拟用城市","拟用城市","text") .AddInput("拟借日期","拟借日期","date") .AddInput("拟用日期","拟用日期","date") .AddInput("拟还日期","拟还日期","date") .AddInput("手机号码","手机号码","text") End With With wb.AddInputGroup("form1","ipg2","备注") With .AddTextArea("备注",5)\'多行文本框,设为5行 .Placeholder="100字以内" .class = "red" End With End With
|
-- 作者:shenyl0211 -- 发布时间:2018/7/12 11:01:00 -- AddTextArea功能参数需要完善 |
-- 作者:shenyl0211 -- 发布时间:2018/7/12 11:18:00 -- 解决了: With .AddInputCell("ic1") \'通过InputCell增加输入框 .AddLabel("证件名称","证件名称",0) \'增加标签,0显示在左边 End With With .AddTextArea("证件名称",10)\'多行文本框,设为10行 .Placeholder="200字以内" .class = "red" End With |
-- 作者:有点甜 -- 发布时间:2018/7/12 11:22:00 -- Select Case e.Path Case "test.htm", "" Dim wb As New weui wb.AddForm("","form1","test.htm") With wb.AddInputGroup("form1","ipg1","基本信息") With .AddInput("申请部门","申请部门","text") End With With .AddTextArea("证件名称",10)\'多行文本框,设为10行 .Placeholder="200字以内" .class = "red" End With .AddInput("用途","用途","text") .AddInput("拟用城市","拟用城市","text") .AddInput("拟借日期","拟借日期","date") .AddInput("拟用日期","拟用日期","date") .AddInput("拟还日期","拟还日期","date") .AddInput("手机号码","手机号码","text") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With Dim str As String = wb.Build str = str.Replace("<div class=\'weui_cell\'> <div class=\'weui_cell_bd weui_cell_primary\'> <textarea id=\'证件名称\' name=\'证件名称\' placeholder=\'200字以内\' class=\'weui_textarea red\' rows=\'10\'></textarea> </div> </div>".replace("> <", ">" & vbcrlf & "<"), _ "<div class=\'weui_cell\'> <div class=\'weui_cell_hd\'><label class=\'weui_label\'>证件名称</label></div> <div class=\'weui_cell_bd weui_cell_primary\'> <textarea id=\'证件名称\' name=\'证件名称\' placeholder=\'200字以内\' class=\'weui_textarea red\' rows=\'10\'></textarea> </div> </div>") e.WriteString(str) \'生成网页 End Select |
-- 作者:shenyl0211 -- 发布时间:2018/7/12 15:22:00 -- 谢谢甜版,真是太用心、太尽心了。 |