本文整理汇总了Python中pyasm.web.Table.add方法的典型用法代码示例。如果您正苦于以下问题:Python Table.add方法的具体用法?Python Table.add怎么用?Python Table.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.web.Table
的用法示例。
在下文中一共展示了Table.add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_display
# 需要导入模块: from pyasm.web import Table [as 别名]
# 或者: from pyasm.web.Table import add [as 别名]
def get_display(self):
audio_configuration_table = Table()
audio_configuration_table.set_id('audio_configuration_table')
audio_configuration_table.add_style('margin', '10px')
if self.lines:
audio_configuration_table.add_row()
audio_configuration_table.add_header('Audio Configuration')
audio_configuration_table.add_row()
audio_configuration_table.add_header('Channel')
audio_configuration_table.add_header('Content')
audio_configuration_table.add_header('Tone')
audio_configuration_table.add_header('Peak')
for iterator, line in enumerate(self.lines):
current_row = audio_configuration_table.add_row()
audio_configuration_table.add_cell(
self.get_text_input_wdg_for_audio_config('channel-{0}'.format(iterator), 150, line.get_value('channel'))
)
audio_configuration_table.add_cell(
self.get_text_input_wdg_for_audio_config('content-{0}'.format(iterator), 150, line.get_value('content'))
)
audio_configuration_table.add_cell(
self.get_text_input_wdg_for_audio_config('tone-{0}'.format(iterator), 150, line.get_value('tone'))
)
audio_configuration_table.add_cell(
self.get_text_input_wdg_for_audio_config('peak-{0}'.format(iterator), 150, line.get_value('peak'))
)
audio_configuration_table.add_cell(
HiddenWdg('audio-line-code-{0}'.format(iterator), line.get_code())
)
audio_configuration_table.add_cell(
self.get_remove_row_button(line.get_code())
)
else:
audio_configuration_table.add("No Audio Configuration lines exist yet. Add one?")
audio_configuration_table.add(self.get_add_row_button())
main_div = DivWdg()
main_div.set_id('audio_config_lines_div')
main_div.add_style('margin', '10px')
main_div.add(audio_configuration_table)
return main_div