请高手:如何在datawindow中动态插入text控件?

dxai 2004-11-24 10:50:22
如何在程序的运行中动态插入text控件到datawindow中,就像在设计时insert-->contrl-->text进的效果.
...全文
86 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
WorldMobile 2004-11-24
  • 打赏
  • 举报
回复
呵呵,即可实现动态创建文本
WorldMobile 2004-11-24
  • 打赏
  • 举报
回复
string ls_create, ls_error
//船舶选择
ls_create += 'create text(band=detail alignment="2" text="测试信息" '
ls_create += 'border="2" color="33554432" '
ls_create += 'x="4" y="4" height="4" '
ls_create += 'width="4" '
ls_create += 'html.valueishtml="0" name=tsh_select visible="0" '
ls_create += 'font.face="宋体" font.height="-9" font.weight="400" font.family="2" '
ls_create += 'font.pitch="2" font.charset="0" background.mode="2" tag = ""'
ls_create += 'background.color="' + string(rgb(255, 0, 255)) + '") '

ls_error = dw_1.modify(ls_create)
WorldMobile 2004-11-24
  • 打赏
  • 举报
回复
visible是个0还是显示不出来,再改一下
string ls_create, ls_error
ls_create += 'create text(band=detail alignment="2" text="测试信息" '
ls_create += 'border="2" color="33554432" '
ls_create += 'x="4" y="4" height="2000" '
ls_create += 'width="3000" '
ls_create += 'html.valueishtml="0" name=tsh_select visible="1" '
ls_create += 'font.face="宋体" font.height="-9" font.weight="400" font.family="2" '
ls_create += 'font.pitch="2" font.charset="0" background.mode="2" tag = ""'
ls_create += 'background.color="' + string(rgb(255, 0, 255)) + '") '

ls_error = dw_1.modify(ls_create)
dw_1.insertrow(0)
WorldMobile 2004-11-24
  • 打赏
  • 举报
回复
你再试一下,不好意思,刚发现这个问题,如果不行,你找我,帮你搞定
WorldMobile 2004-11-24
  • 打赏
  • 举报
回复
不好意思,宽度和高度太小了,可能看不到效果,改一下
string ls_create, ls_error
//船舶选择
ls_create += 'create text(band=detail alignment="2" text="测试信息" '
ls_create += 'border="2" color="33554432" '
ls_create += 'x="4" y="4" height="2000" '
ls_create += 'width="3000" '
ls_create += 'html.valueishtml="0" name=tsh_select visible="0" '
ls_create += 'font.face="宋体" font.height="-9" font.weight="400" font.family="2" '
ls_create += 'font.pitch="2" font.charset="0" background.mode="2" tag = ""'
ls_create += 'background.color="' + string(rgb(255, 0, 255)) + '") '

ls_error = dw_1.modify(ls_create)
dxai 2004-11-24
  • 打赏
  • 举报
回复
哦...

611

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧