界面上单元格的可操作性和背景颜色根据某一个单元格值的变化而发生改变
来源:互联网 发布:淘宝 桌游 编辑:程序博客网 时间:2024/05/17 18:27
在[字段构件]下字段的对应事件的[脚本内容]写入类似如下的代码:
var w=MastercurRowNo;
if (MastercurGUIState== 2)
w=10;
vara=getF('M','XExpectValueOperateFlag',w);
vara1=getF('M','ExpectValueOperateFlag',w);
varb=getF('M','ExpectValue',w)
varc=getF('M','TopLimitValue',w)
vard=getF('M','BottomLimitValue',w)
vare=getF('M','XMinValueOperateFlag',w)
vare1=getF('M','MinValueOperateFlag',w)
var g=getF('M','XMaxValueOperateFlag',w)
varg1=getF('M','MaxValueOperateFlag',w)
vari=getF('M','StrExpectValue',w)
var id=getFv('M','ValueType',w);
if(id==0)
{
a.disabled=true;a.style.background='gray';a.value='';a1.value='';
b.disabled=true;b.style.background='gray';b.value='';
c.disabled=true;c.style.background='gray';c.value='';
d.disabled=true;d.style.background='gray';d.value='';
e.disabled=true;e.style.background='gray';e.value='';e1.value='';
g.disabled=true;g.style.background='gray';g.value='';g1.value='';
i.disabled=true;i.style.background='gray';i.value='';
}
if(id==1)
{
a.disabled=true;a.style.background='gray';a.value='';a1.value='';
b.disabled=false;b.style.background='';
c.disabled=false;c.style.background='';
d.disabled=false;d.style.background='';
e.disabled=true;e.style.background='gray';e.value='';e1.value='';
g.disabled=true;g.style.background='gray';g.value='';g1.value='';
i.disabled=true;i.style.background='gray';i.value='';
}
if(id==2)
{
a.disabled=false;a.style.background='';
b.disabled=false;b.style.background='';
c.disabled=true;c.style.background='gray';c.value='';
d.disabled=true;d.style.background='gray';d.value='';
e.disabled=true;e.style.background='gray';e.value='';e1.value='';
g.disabled=true;g.style.background='gray';g.value='';g1.value='';
i.disabled=true;i.style.background='gray';i.value='';
}
if (id==3)
{
a.disabled=true;a.style.background='gray';a.value='';a1.value='';
b.disabled=true;b.style.background='gray';b.value='';
c.disabled=false;c.style.background='';
d.disabled=false;d.style.background='';
e.disabled=false;e.style.background='';
g.disabled=false;g.style.background='';
i.disabled=true;i.style.background='gray';i.value='';
}
if(id==4)
{
a.disabled=true;a.style.background='gray';a.value='';a1.value='';
b.disabled=true;b.style.background='gray';b.value='';
c.disabled=true;c.style.background='gray';c.value='';
d.disabled=true;d.style.background='gray';d.value='';
e.disabled=true;e.style.background='gray';e.value='';e1.value='';
g.disabled=true;g.style.background='gray';g.value='';g1.value='';
i.disabled=false;i.style.background='';
}
界面显示图例:
- 界面上单元格的可操作性和背景颜色根据某一个单元格值的变化而发生改变
- 界面中单元格值的颜色随着值的变化而变化技巧
- Excel的单元格根据文字内容改变格式,比如改变单元格的背景颜色
- 根据绑定的值的不同改变gridview里某一单元格的字体或背景颜色
- 改变表格单元格的背景颜色
- 动态改变Gridview单元格的背景颜色
- word 改变表格,单元格的背景颜色
- clistctrl改变单元格的背景颜色
- [原创]可改变单元格字体和背景颜色的CListCtrl
- ext grid 改变某一个单元格的值
- ExtJS Grid 改变单元格背景颜色的方法
- ExtJS Grid 改变单元格背景颜色的方法
- EXTJS GRID 改变单元格背景颜色的方法
- jtable设置某一个单元格的颜色
- EXTJS根据值Value改变gridpanel单元格背景颜色或者设置整行字体颜色
- 设置JTable某个单元格的背景颜色和前景颜色
- Qt Model/View view单元格值改变其相应的背景颜色也变
- aspxGridview 根据单元格值得不同,设置单元格字体的颜色
- 安装nexus
- dp 0-1
- 1001. A+B Format (20)
- nanomsg的使用与分析
- C++Primer学习之四初始化
- 界面上单元格的可操作性和背景颜色根据某一个单元格值的变化而发生改变
- 总结2015,启航2016
- 使弹出框的标题显示为父窗体上选中行的内容
- 界面元素查询语句计算页数SQL中增加汇总值描述
- 隐马尔可夫模型(HMM)攻略
- 实现界面全选效果
- linux例行性命令
- 2、决策树ID3、C4.5、CART
- HTML5开发移动web应用——SAP UI5篇(4)