国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

如何使指定ITEM單元格變色?(原創)

2024-07-21 02:06:03
字體:
來源:轉載
供稿:網友

如何使指定item單元格變色?

問題描述:

如何在使用setitem后修改的各個單元格字體變成蘭色,其他單元格仍保留黑色字體?

解決方案:

string ls_modstring,ls_rows[]

long ll_row,ll_col,ll_pos

 

for ll_pos = 1 to long(dw_1.object.datawindow.column.count)

    ls_rows[ll_pos] = ""

next

 

dw_1.setredraw(false)

 

//假設此處要修改第2行、第1列

ll_row = 2

ll_col = 1

dw_1.setitem(ll_row,ll_col,"testdata")

if len(ls_rows[ll_col]) = 0 then

    ls_rows[ll_col] = string(ll_row)

else

    ls_rows[ll_col] = ls_rows[ll_col] + "," + string(ll_row)

end if

 

ls_modstring = "#"+string(ll_col)+".color='0~tcase(getrow() when "+ ls_rows[ll_col] +" then rgb(0,0,255) else rgb(0,0,0))'" 

dw_1.modify(ls_modstring)

 

//假設此處要修改第4行、第2列

ll_row = 4

ll_col = 2

dw_1.setitem(ll_row,ll_col,"testdata2")

if len(ls_rows[ll_col]) = 0 then

    ls_rows[ll_col] = string(ll_row)

else

    ls_rows[ll_col] = ls_rows[ll_col] + "," + string(ll_row)

end if

 

ls_modstring = "#"+string(ll_col)+".color='0~tcase(getrow() when "+ ls_rows[ll_col] +" then rgb(0,0,255) else rgb(0,0,0))'" 

dw_1.modify(ls_modstring) 

dw_1.setredraw(true)
,歡迎訪問網頁設計愛好者web開發。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宾阳县| 吉木乃县| 邯郸市| 丰都县| 瑞金市| 阜南县| 岚皋县| 辽阳市| 蓝田县| 都安| 黔东| 三门峡市| 江北区| 天柱县| 久治县| 酒泉市| 永靖县| 神农架林区| 确山县| 北宁市| 巧家县| 昆山市| 武夷山市| 常州市| 嘉黎县| 全椒县| 河池市| 普兰县| 富顺县| 合川市| 尤溪县| 诸城市| 集贤县| 大名县| 平武县| 承德市| 淮北市| 商城县| 佛冈县| 汪清县| 平谷区|