本文整理汇总了Python中pyasm.web.Table.add_gradient方法的典型用法代码示例。如果您正苦于以下问题:Python Table.add_gradient方法的具体用法?Python Table.add_gradient怎么用?Python Table.add_gradient使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.web.Table
的用法示例。
在下文中一共展示了Table.add_gradient方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_display
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add_gradient [as 别名]
def get_display(my):
top = my.top
top.add_class("spt_help_edit_top")
top.add_color("background", "background")
view = my.kwargs.get("view")
from tactic.ui.container import ResizableTableWdg
table = ResizableTableWdg()
top.add(table)
table.add_color("color", "color")
table.add_style("width: 100%")
table.add_style("height: 500px")
table.add_row()
left = table.add_cell()
left.add_color("background", "background3")
title_wdg = Table()
title_wdg.add_row()
left.add(title_wdg)
title_wdg.add_gradient("background", "background", 0, -10)
title_wdg.add_style("padding: 5px")
title_wdg.add_style("margin-bottom: 5px")
title_wdg.add_style("width: 100%")
title_div = DivWdg("<b>Help Pages</b>")
title_cell = title_wdg.add_cell(title_div)
title_cell.add_style("width: 100%")
from tactic.ui.widget import ActionButtonWdg
insert_button = ActionButtonWdg(title="+", size="small")
insert_button.add_style("margin-top: -3px")
insert_button.add_behavior( {
'type': 'click_up',
'cbjs_action': '''
var class_name = "tactic.ui.panel.EditWdg"
var view = "edit"
var title = "Add new help doc"
var cbjs_insert = "spt.tab.reload_selected();"
var kwargs = {
'view': view,
'search_type': 'config/widget_config',
'default': '{"category":"HelpWdg"}',
'ignore': 'search_type|login|config',
'mode': 'insert',
//'cbjs_insert': cbjs_insert
}
spt.panel.load_popup(title, class_name, kwargs);
'''
})
title_wdg.add_cell(insert_button)
docs_wdg = my.get_doc_wdg()
left.add(docs_wdg)
left.add_style("width: 150px")
left.add_style("min-width: 150px")
left.add_style("min-height: 500px")
left.add_style("vertical-align: top")
left.add_border()
right = table.add_cell()
right.add_style("vertical-align: top")
right.add_border()
content = HelpEditContentWdg(view=view)
right.add(content)
return top