怎么动态删除或增加数据窗口列

lovelihp 2005-06-02 11:26:38
就是已经创建了一个数据窗口了,在程序中运行后,想增加一个列,或者删除一个列,是不是能用MODIFY函数啊,请高手指教!!!
...全文
307 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovelihp 2005-06-03
  • 打赏
  • 举报
回复
看来意见比较统一是CREATE(),关注有没有更简单的方法
xyqiqi 2005-06-03
  • 打赏
  • 举报
回复
新建-tool-datawindowsyntax,里面有datawomdow的各种语法,可以参考一下。
ezlove 2005-06-03
  • 打赏
  • 举报
回复
用处很大 帮顶
rightyeah 2005-06-03
  • 打赏
  • 举报
回复
当然可以create了。 gwgok(gwg)的代码都是从 DWSYNTAX里面抄来的
princelily 2005-06-03
  • 打赏
  • 举报
回复
大家都说了。哈哈
友情+帮顶!
zxz107 2005-06-02
  • 打赏
  • 举报
回复
可以先把不需要的列先隐藏,程序运行时需要显示新列时显示时既可
wscft 2005-06-02
  • 打赏
  • 举报
回复
这个还没有玩过呢, 强烈关注!
nimittz 2005-06-02
  • 打赏
  • 举报
回复
destroy 是可以的但是create 据我所知好像不行的阿
CREATE object (settings) Adds object to the DataWindow object (such as text, computed fields, and bitmaps). Settings is a list of properties and values using the format you see in exported DataWindow syntax. To create an object, you must supply enough information to define it.
renwanly 2005-06-02
  • 打赏
  • 举报
回复
简单的方法就是2楼,但效果不是很好,因为可能加的列数目很多,
复杂的方法就是create()方法,但做出的数据窗口可能不尽如人意,除非你定制了很好的机制来动态修改数据窗口到适合的显示格式,我正在想将这个过程封装起来,以做到完全的动态窗口,包括用户可修改数据库之后将字段内容显示到数据窗口等类似的操作
yzip 2005-06-02
  • 打赏
  • 举报
回复
1.这种是不是可以创建Column,没有试验过,可以尝试一下.
Modify("create compute(band=detail x='0' y='0' " + "height='0' width='0' name=pfc_tvi_key " + ls_Exp + ")")
2.可以先导出数据窗口的语法,修改之后用:dw_obj.create(ls_syntax)的方法创建新的数据窗口对象.
纸飞机2017 2005-06-02
  • 打赏
  • 举报
回复
<DW Control Name>.Modify(&
"destroy <optionally specify the keyword 'column'> <Columnname>")
//Example: dw_1.Modify("destroy column salary")
//OR
// dw_1.Modify("destroy salary")
纸飞机2017 2005-06-02
  • 打赏
  • 举报
回复
<DW Control Name>.Modify(&
"create column( id=<an integer> tabsequence=<an integer> accelerator='<a single letter>' moveable=<0 - False, 1 - True> resizeable=<0 - False, 1 - True> pointer='<Arrow!, Cross!, HourGlass!, IBeam!, Icon!, Size!, SizeNESW!, SizeNS!, SizeNWSE!, SizeWE!, UpArrow!, or cursor filename (with path)>' band=<Detail, Footer, Header, Header.<group #>, Summary, Trailer.<group #>, Background, Foreground>" + &
" x='<an integer>' y='<an integer>' bitmapname=<Yes or No> criteria.dialog=<Yes or No> criteria.override_edit=<Yes or No> format='<constant string containing display format (i.e., [general]) for col (can also be an expression)>' alignment='<0 - Left, 1 - Right, 2 - Center>' criteria.required=<Yes or No> height.autosize=<Yes or No> border='<0 - None, 1- Shadow, 2 - Box, 3 - Resize, 4 - Underline, 5 - 3D Lowered, 6 - 3D Raised>' color='<a long>' height='<an integer>' width='<an integer>' name=<string> tag='<string>'"+&
" background.mode='<0 - Opaque, 1 - Transparent>' background.color='<a long>' font.face='<name of type face (i.e., SYSTEM, COURIER)>' font.height='<negative number for points, positive number for PBUs (i.e., -10 = 10 points, 10 = 10 PBUs>' font.weight='<400 - Normal, 700 - Bold>' font.family='<0 - AnyFont, 1 - Roman, 2 - Swiss, 3 - Modern, 4 - Script, 5 - Decorative>' font.pitch='<0 - default, 1 - Fixed, 2 - Variable>' font.charset='<0 - Ansi, 1 - default, 2 - Symbol, 128 - Shift JIS, 255 - OEM>' font.italic='<0 - False, 1 - True>' font.strikethrough='<0 - False, 1 - True>' font.underline='<0 - False, 1 - True>' html.link='<URL (with or without parameters) that is used to generate a link for each row of the particular column>' html.linktarget='<Target frame or window that is used to as part of the generated link for each row of the particular column>' html.linkargs='<argName>='<expr>' [<argName>='<expr>'] ...'"+&
" edit.validatecode=<Yes or No> edit.focusrectangle=<Yes or No> edit.format=<constant string containing display format (i.e., [general]) for col (can also be an expression)> edit.nilisnull=<Yes or No> edit.password=<Yes or No> edit.required=<Yes or No> edit.hscrollbar=<Yes or No> edit.limit=<max number of chars the user can type (0 - 32767)> edit.codetable=<Yes or No> edit.displayonly=<Yes or No> edit.autovscroll=<Yes or No> edit.case=<Any, Upper or Lower> edit.autohscroll=<Yes or No> edit.autoselect=<Yes or No> edit.vscrollbar=<Yes or No> edit.name='<repository style name, if any>') ")
j9dai 2005-06-02
  • 打赏
  • 举报
回复
用Create()动态创建数据窗口
二楼也不失为一种好办法

609

社区成员

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

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