社区
DataWindow
帖子详情
如何修改modify并提交了的行的背景颜色,在datawindow中?(在线)
justone
2002-05-27 01:27:24
同题
...全文
77
4
打赏
收藏
如何修改modify并提交了的行的背景颜色,在datawindow中?(在线)
同题
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
WorldMobile
2002-05-27
打赏
举报
回复
dw_main.modify("detail.color = if(not isRowModified(), rgb(255, 255, 255), rgb(58, 110, 165))")
海洋‘s
2002-05-27
打赏
举报
回复
可以参考啊...........
if(getrow()=currentrow(),rgb(0,0,255),rgb(0,0,128))
if(getrow()=currentrow(),rgb(0,255,255),rgb(255,255,255))
blackcorbie
2002-05-27
打赏
举报
回复
你可以这样:
dw_1.selectrow(0,false)
dw_1.selectrow(row,true)
你要是改变整个数据窗口的背景颜色,就在创建数据窗口的时候,选择属性即可!
海洋‘s
2002-05-27
打赏
举报
回复
string mod_string, err
long color1, color2, color3, default_color
err = dw_emp.Modify("salary.Background.Mode=0")
IF err <> "" THEN
MessageBox("Status", &
"Change to Background Mode Failed " + err)
RETURN
END IF
/* Pseudocode for mod_string:
If salary less than 10000, set the background to red.
If salary greater than or equal to 10000 but less than 20000, set the background to blue.
If salary greater than or equal to 20000 but less than 30000, set the background color to green.
Otherwise, set the background color to white, which is also the default.
*/
color1 = 255 //red
color2 = 16711680 //blue
color3 = 65280 //green
default_color = 16777215//white
mod_string = &
"salary.Background.Color = '" &
+ String(default_color) &
+ "~tIf(salary < 10000," &
+ String(color1) &
+ ",If(salary < 20000," &
+ String(color2) &
+ ",If(salary < 30000," &
+ String(color3) &
+ "," &
+ String(default_color) &
+ ")))'"
err = dw_emp.Modify(mod_string)
IF err <> "" THEN
MessageBox("Status", &
"Change to Background Color Failed " + err)
RETURN
END IF
【PB案例学习笔记】-37设置数据窗口颜色
本文介绍了如何使用PowerBuilder为数据窗口表格设置
背景颜色
。通过连接Oracle数据库并创建网格风格的数据窗口对象,在属性卡
中
设置表头为蓝色背景,数据区域根据性别显示不同颜色(男生灰色,女生浅黄色)。文章详细说明了创建窗口、添加控件、设置颜色表达式及编写连接和查询代码的步骤,最终实现了一个美观醒目的数据展示效果。文
中
还提供了完整的源码仓库地址,方便读者参考和下载。
data
window
常用事件
data
window
上的事件,按照顺序(除开公用事件) 事件名称 事件触发的时机 01.ButtonClicking 在数据窗口
中
的按钮对象正在被单击时触发 02.ButtonClicked 在数据窗口
中
的按钮对象被单击后触发 03.DbError 当数据窗口
中
发生了数据...
常用代码
[
Window
]1.获取
Data
Window
Detail区高度
String ls_height
ls_height = dw_1.Object.
Data
Window
.Detail.Height---------------------
2.调用其它事件:
PostEvent(Parent,"ue_open")
TriggerEvent(Parent,"ue_event")
This.pb_gxyl.Event Clicked
PowerBuilder核心技术深度解析:系统函数与
Data
Window
实战应用
PowerBuilder 提供了丰富的系统函数,作为开发者与数据库、界面及业务逻辑交互的核心工具。这些函数按功能可分为日期时间、字符串处理、数据类型转换、空值判断等类别,广泛应用于金融、电信、制造等
行
业系统的开发
中
。例如,在交易系统
中
通过GetDate()生成精确时间戳,利用IsNull()防止空值入库,结合Len()与Trim()确保用户输入合法性。系统函数不仅提升编码效率,更增强了程序的稳定性和可维护性,是构建高可靠性企业应用不可或缺的基础组件。:当表达式值为NULL时返回。
PowerBuilder版LIS系统源码实战解析
Modify
()是PowerBuilder
中
最强大的运
行
时控制方法之一,可用于更改
Data
Window
任意属性。// 动态隐藏某个字段//
修改
字体颜色// 添加新的计算字段ls_result = dw_main.
Modify
("
Data
Window
.Detail.Height=64") // 先扩容上述代码展示了如何在不重启应用的情况下调整界面表现。特别地,颜色表达式采用了条件语法,实现了“超标值标红”的临床常见需求。
DataWindow
611
社区成员
20,469
社区内容
发帖
与我相关
我的任务
DataWindow
PowerBuilder DataWindow
复制链接
扫一扫
分享
社区描述
PowerBuilder DataWindow
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章