on 07-16-2009 2:10 AM
怎么样控制文本框自定义字段,使其对于用户是不可编辑的,但是可以在开发的ADDON程序中对其进行赋值?
(在测试中,我用过以下两种方法都未能实现,
第一种,如果将某个文本框自定义字段设为u201C不活动u201D,也就是对用户不可编辑,那么在程序中,通过 oEditText.Value = "My Value By ADDON";这种方式赋值的话,会报 u201CItem not editableu201D的异常。
第二种,我在程序中设置在自定义字段文本框获得焦点focus的时候,使其失去焦点,但是这种方法同样是程序使用oEditText.Value = "My Value By ADDON"; 这种方式无法赋值,)
PS:之前自己多发了一个问题,可不可以删除呢?
Hi Ke,
第一种方法,在赋值前先把Item控件设为可编辑,赋值后,再恢复为不可编辑即可。
oItem.Editable = true
oItem.Value = "***"
oItem.Editable = false
你说的多发的帖子,是这个帖子吗?u201C还是这个如何根据FORM的模式控制其中的Item问题 u201D
普通用户没有删贴功能,呵呵
Regards, Yatsea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.