本文整理汇总了Python中tactic.ui.input.TextInputWdg.set_name方法的典型用法代码示例。如果您正苦于以下问题:Python TextInputWdg.set_name方法的具体用法?Python TextInputWdg.set_name怎么用?Python TextInputWdg.set_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tactic.ui.input.TextInputWdg
的用法示例。
在下文中一共展示了TextInputWdg.set_name方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_display
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_display(self):
outer_div = DivWdg()
outer_div.add_class('new-work-order-entry-form')
page_label = "Work Order for {0}".format(self.title_order)
outer_div.add(page_label)
process_input = TextInputWdg()
process_input.set_name('process')
outer_div.add(get_label_widget('Process'))
outer_div.add(process_input)
instructions_input = TextAreaInputWdg()
instructions_input.set_name('instructions')
outer_div.add(get_label_widget('Instructions'))
outer_div.add(instructions_input)
description_input = TextAreaInputWdg()
description_input.set_name('description')
outer_div.add(get_label_widget('Description (Optional)'))
outer_div.add(description_input)
submit_button = SubmitWdg('Submit')
submit_button.add_behavior(self.submit_button_behavior())
outer_div.add(submit_button)
return outer_div
示例2: get_display
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_display(self):
# Set up the outer <div> to hold all the form elements
outer_div = DivWdg()
outer_div.add_class('new-order-entry-form')
outer_div.set_id('new-order-entry-form')
# Set up the <input> widget for 'name'
outer_div.add(HtmlElement.label('Name'))
name_input = TextInputWdg(name='name')
outer_div.add(name_input)
# Set up the <input> widget for 'po_number'
outer_div.add(HtmlElement.label('PO Number'))
po_number_input = TextInputWdg()
po_number_input.set_name('po_number')
outer_div.add(po_number_input)
# Set up the <select> widget and it's options for 'client'
outer_div.add(HtmlElement.label('Client'))
client_select_wdg = get_select_widget_from_search_type('twog/client', 'client', 'name', 'code')
outer_div.add(client_select_wdg)
# Set up the Save button
save_button = SubmitWdg('Save')
save_button.add_behavior(self.save_button_behavior())
outer_div.add(save_button)
# Set up the Save and Add button
save_and_add_button = SubmitWdg('Save and Add')
save_and_add_button.add_behavior(self.save_and_add_button_behavior())
outer_div.add(save_and_add_button)
return outer_div
示例3: get_display
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_display(self):
outer_div = DivWdg()
outer_div.add_class('new-title-entry-form')
title_name_input = TextInputWdg()
title_name_input.set_name('name')
outer_div.add(get_label_widget('Name'))
outer_div.add(title_name_input)
episode_input = TextInputWdg()
episode_input.set_name('episode')
outer_div.add(get_label_widget('Episode'))
outer_div.add(episode_input)
description_input = TextAreaInputWdg()
description_input.set_name('description')
outer_div.add(get_label_widget('Description'))
outer_div.add(description_input)
submit_button = SubmitWdg('Submit')
submit_button.add_behavior(self.submit_button_behavior())
outer_div.add(submit_button)
return outer_div
示例4: get_display
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_display(self):
outer_div = DivWdg()
outer_div.add_class('new-order-entry-form')
order_name_input = TextInputWdg()
order_name_input.set_name('name')
outer_div.add(get_label_widget('Name'))
outer_div.add(order_name_input)
po_number_input = TextInputWdg()
po_number_input.set_name('po_number')
outer_div.add(get_label_widget('PO Number'))
outer_div.add(po_number_input)
client_select_wdg = get_select_widget_from_search_type('twog/client', 'client', 'name', 'code')
outer_div.add(get_label_widget('Client'))
outer_div.add(client_select_wdg)
sales_rep_select_wdg = get_select_widget_from_search_type('sthpw/login_in_group', 'Client', 'login_full_name',
'code', [('login_group', 'sales')])
outer_div.add(get_label_widget('Sales Rep'))
outer_div.add(sales_rep_select_wdg)
submit_button = SubmitWdg('Submit')
submit_button.add_behavior(self.submit_button_behavior())
outer_div.add(submit_button)
return outer_div
示例5: get_text_input_wdg
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_text_input_wdg(name, width=200, line_data=None):
textbox_wdg = TextInputWdg()
textbox_wdg.set_id(name)
textbox_wdg.set_name(name)
textbox_wdg.add_style('width', '{0}px'.format(width))
if line_data:
textbox_wdg.set_value(line_data)
return textbox_wdg
示例6: get_text_input_wdg
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_text_input_wdg(self, field_name, width=200):
textbox_wdg = TextInputWdg()
textbox_wdg.set_id(field_name)
textbox_wdg.set_name(field_name)
textbox_wdg.add_style('width', '{0}px'.format(width))
if hasattr(self, field_name):
textbox_wdg.set_value(getattr(self, field_name))
return textbox_wdg
示例7: get_text_input_wdg
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_text_input_wdg(name, width=200, pretext=None):
textbox_wdg = TextInputWdg()
textbox_wdg.set_id(name)
textbox_wdg.set_name(name)
textbox_wdg.add_style('width', '{0}px'.format(width))
if pretext:
textbox_wdg.set_value(pretext)
return textbox_wdg
示例8: get_timecode_textbox
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_timecode_textbox(self, name, width=200, line_data=None):
timecode_textbox = TextInputWdg()
timecode_textbox.set_id(name)
timecode_textbox.set_name(name)
timecode_textbox.add_style('width', '{0}px'.format(width))
timecode_textbox.add_behavior(get_add_colons_for_time_behavior())
if line_data:
timecode_textbox.set_value(line_data)
return timecode_textbox
示例9: get_text_input_wdg
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_text_input_wdg(name, data, width=200, timecode=False):
textbox_wdg = TextInputWdg()
textbox_wdg.set_id(name)
textbox_wdg.set_name(name)
textbox_wdg.add_style('width', '{0}px'.format(width))
if timecode:
textbox_wdg.add_behavior(get_add_colons_for_time_behavior())
if data:
textbox_wdg.set_value(data)
return textbox_wdg
示例10: get_process_widget
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_process_widget(outer_div):
process_input = TextInputWdg()
process_input.set_name('process')
outer_div.add(get_label_widget('Process'))
outer_div.add(process_input)
示例11: get_priority_widget
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_priority_widget(outer_div):
priority_input = TextInputWdg()
priority_input.set_name('priority')
outer_div.add(get_label_widget('Priority'))
outer_div.add(priority_input)
示例12: get_total_program_runtime_widget
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_name [as 别名]
def get_total_program_runtime_widget(outer_div):
total_program_runtime_input = TextInputWdg()
total_program_runtime_input.set_name('total_program_runtime')
outer_div.add(get_label_widget('Total Program Runtime'))
outer_div.add(total_program_runtime_input)