本文整理汇总了Python中pyasm.widget.HiddenWdg.add_border方法的典型用法代码示例。如果您正苦于以下问题:Python HiddenWdg.add_border方法的具体用法?Python HiddenWdg.add_border怎么用?Python HiddenWdg.add_border使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.widget.HiddenWdg
的用法示例。
在下文中一共展示了HiddenWdg.add_border方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_display
# 需要导入模块: from pyasm.widget import HiddenWdg [as 别名]
# 或者: from pyasm.widget.HiddenWdg import add_border [as 别名]
#.........这里部分代码省略.........
div.add_styles('text-align: right; margin: 0 4px 4px 0')
td.add(div)
elif row_to_draw == my.ENT_ROW:
time_prefix = 'ent'
div = DivWdg()
div.add("ET")
div.add_styles('text-align: right; margin: 0 4px 4px 0')
td.add(div)
for idx, day in enumerate(days):
day_wdg = DivWdg()
day_wdg.add(day)
td = table.add_cell()
td.add_style("width: %spx" % my.day_width)
text = TextWdg('%sday_%s' % (time_prefix, day))
if disabled:
text.set_option('read_only','true')
text.set_attr('disabled','disabled')
td.add(text)
text.add_class('spt_day%s' % (time_prefix))
text.add_styles("width: %spx;text-align: right;padding-left: 2px" %(my.day_width-2))
#text.add_styles("width: 100%;text-align: right;padding-left: 2px")
if day == today:
text.add_style("border: solid 1px black")
else:
text.add_border()
week_day = my.weekday_dict[idx]
if week_day in ['Sat','Sun']:
# MAIN: Overtime, weekend
if row_to_draw == my.OT_ROW:
text.add_color("background", "background2", modifier=[-15,0,5])
else:
text.add_color("background", "background2", modifier= [0,15,20])
text.add_style("margin: 0px 1px")
if row_to_draw == my.OT_ROW:
text.add_attr('input_field_type', 'ot')
else:
text.add_attr('input_field_type', 'st')
if my.kwargs.get('show_all_users')=='true':
text.set_option('read_only','true')
#TODO: while we may have multiple entries per task, we will only use the latest one here
# for now, making the UI cleaner
# if a corresponding entry exists, display its value
entry_list_dict = entries.get(day)
daily_sum = 0
value = 0
entry_list = []
if entry_list_dict:
row_key = my.ROW_DICT.get(row_to_draw)
entry_list = entry_list_dict.get(row_key)
if entry_list: