Skip to Content
author's profile photo Former Member
Former Member

控制文本框自定义字段对用户不可编辑,但可以在ADDON程序中对其赋值?

怎么样控制文本框自定义字段,使其对于用户是不可编辑的,但是可以在开发的ADDON程序中对其进行赋值?

(在测试中,我用过以下两种方法都未能实现,

第一种,如果将某个文本框自定义字段设为u201C不活动u201D,也就是对用户不可编辑,那么在程序中,通过 oEditText.Value = "My Value By ADDON";这种方式赋值的话,会报 u201CItem not editableu201D的异常。

第二种,我在程序中设置在自定义字段文本框获得焦点focus的时候,使其失去焦点,但是这种方法同样是程序使用oEditText.Value = "My Value By ADDON"; 这种方式无法赋值,)

PS:之前自己多发了一个问题,可不可以删除呢?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 17, 2009 at 09:09 AM

    Hi Ke,

    第一种方法,在赋值前先把Item控件设为可编辑,赋值后,再恢复为不可编辑即可。

    oItem.Editable = true
    oItem.Value = "***"
    oItem.Editable = false

    你说的多发的帖子,是这个帖子吗?u201C还是这个如何根据FORM的模式控制其中的Item问题 u201D

    普通用户没有删贴功能,呵呵

    Regards, Yatsea

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.