多按钮风格模型
金蝶云社区-lindsey
lindsey
45人赞赏了该文章 905次浏览 未经作者许可,禁止转载编辑于2018年12月16日 09:54:22

多按钮风格模型

风格按钮4

2016-06-07 上传

下载附件 (6.44 KB)
风格按钮4


代码:
from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *

def AfterBindData(e):
    this.View.GetControl("FBLUE").SetStyleKey("BluePureRightAngleButtonStyle")
    this.View.GetControl("FORANGE").SetStyleKey("OrangePureRightAngleButtonStyle")
    this.View.GetControl("FBLACK").SetStyleKey("BlackPureRightAngleButtonStyle")
   
    this.View.GetControl("FSHOPCAR").SetStyleKey("TextIconWithMsgButtonStyle")
    this.View.GetControl("FSHOPCAR").SetViceText("300")
    this.View.GetControl("FSHOPCAR").SetTextIcon("images/biz/default/Common/ShopcarBig.png")
   
    this.View.GetControl("FSHOPCAR1").SetStyleKey("TextIconWithMsgButtonStyle")
    this.View.GetControl("FSHOPCAR1").SetViceText("9")
    this.View.GetControl("FSHOPCAR1").SetTextIcon("images/biz/default/Common/AddFavor.png")

    this.View.GetControl("FCOLLECT").SetStyleKey("FavorBlackPureRightAngleButtonStyle")
   
def ButtonClick(e):
    if(e.Key=="FSHOPCAR"):
        this.View.GetControl("FSHOPCAR").SetViceText("302")
        this.View.GetControl("FSHOPCAR").SetTextIcon("images/biz/default/Common/AddFavor.png")



图片格式的按钮





为客户门户增加了图片格式的按钮,其他一些个别性的按钮都自己做图片搞了。
风格按钮2

2016-06-07 上传

下载附件 (5.16 KB)
风格按钮2

     
任意设置按钮的图片,但会覆盖文字。插件这么写就好。
风格按钮1

2016-06-07 上传

下载附件 (68.5 KB)
风格按钮1



this.View.GetControl("FBUTTON").SetStyleKey("OrangeButton")
这句话实现 橙色风格的按钮  
风格按钮3

2016-06-07 上传

下载附件 (2.93 KB)
风格按钮3




代码:

from Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel import *

def AfterBindData(e):
    #this.View.AddAction('ShowWatcher',None) #这句话显示HTTPWatch
    #this.View.GetControl("FBUTTON").SetStyleKey("OrangeButton")
    this.View.GetControl("FBUTTON").SetImageUrl("images/silverlight/default/2.0/blockmode.png")
    this.View.GetControl("FBUTTON1").SetImageUrl("images/silverlight/default/2.0/linemode.png")
   
def ButtonClick(e):
    this.View.GetControl("FBUTTON").SetImageUrl("images/silverlight/default/2.0/blockmode.png")
    this.View.GetControl("FBUTTON1").SetImageUrl("images/silverlight/default/2.0/linemode.png")

赞 45