Python Set document header color

Source: Internet
Author: User

the document Header Setup code is as follows:

Clr. AddReference (' System ')
Clr. AddReference (' Kingdee.BOS.Core ')
fromKingdee.BOS.Core.DynamicForm.PlugInImport*
fromKingdee.BOS.Core.Metadata.EntityElementImport*
fromSystemImport*
defCreateControl (E):
ifE.controlappearance.key = ="FAmount1":#控件标识
#设定控件背景颜色
e.control["BackColor"] =' #FF7F00 ';
#设定控件字体颜色
e.control["ForeColor"] =' #FF0000 ';

The document body Setup code is as follows:

    1. #PythonEntitySetColor

    2. #如下Python脚本 the "Sales order" "Details" document is clicked on the document Body menu,

    3. # details document body first row background color set to XXX, field ' item name ' foreground color set to red

    4. Clr. AddReference (' Kingdee.BOS.Core ')

    5. From Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel Import *


    6. def Afterentrybaritemclick (E):

    7. Grid = this. View.getcontrol[entrygrid] ("Fsaleorderentry") #需要设置的单据体标识Key

    8. Grid. Setrowbackcolor ("#FFFF00", 0) #设置整行背景颜色

    9. Grid. Setforecolor ("Fmaterialname", "#FF0000", 0) #需要设置字段标识Key


Python Set document header color

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.