本文整理汇总了Python中tactic.ui.input.TextInputWdg.set_id方法的典型用法代码示例。如果您正苦于以下问题:Python TextInputWdg.set_id方法的具体用法?Python TextInputWdg.set_id怎么用?Python TextInputWdg.set_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tactic.ui.input.TextInputWdg
的用法示例。
在下文中一共展示了TextInputWdg.set_id方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_text_input_wdg
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_id [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
示例2: get_text_input_wdg
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_id [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
示例3: get_text_input_wdg
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_id [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
示例4: get_timecode_textbox
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_id [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
示例5: get_text_input_wdg
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_id [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
示例6: get_display
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_id [as 别名]
#.........这里部分代码省略.........
button.add_behavior( {
'type': 'click_up',
'cbjs_action': '''
spt.api.Utility.clear_inputs( bvr.src_el.getParent('.spt_js_editor') );
editAreaLoader.setValue('shelf_script', '');
'''
} )
button_div.add(button)
"""
div.add( "<br clear='all'/><br/>")
save_wdg = DivWdg()
div.add(save_wdg)
save_wdg.add_style("padding: 2px 5px 6px 5px")
#save_wdg.add_color("background", "background", -5)
# script code
save_span = Table()
save_wdg.add(save_span)
save_span.add_row()
code_span = SpanWdg()
code_span.add("<b>Code: </b>")
save_span.add_cell(code_span)
code_text = TextInputWdg(name="shelf_code")
code_text.add_style("display: inline")
code_text.add_style("width: 100px")
code_text.set_value(script_code)
code_text.add_attr("readonly", "true")
code_text.set_id("shelf_code")
code_text.add_class("spt_code")
td = save_span.add_cell(code_text)
td.add_style("padding-top: 10px")
save_span.add_cell(" ")
# script name (path??)
save_span.add_cell("<b>Script Path: </b>")
save_text = TextInputWdg(name="shelf_folder")
save_text.add_style("width: 120px")
save_text.add_attr("size", "40")
save_text.set_id("shelf_folder")
save_text.add_class("spt_folder")
save_text.set_value(script_folder)
td = save_span.add_cell(save_text)
td.add_style("padding-top: 10px")
save_span.add_cell(" / ")
save_text = TextInputWdg(name="shelf_title")
save_text.add_style("width: 350px")
save_text.add_attr("size", "40")
save_text.set_id("shelf_title")
save_text.add_class("spt_title")
save_text.set_value(script_name)
td = save_span.add_cell(save_text)
td.add_style("padding-top: 10px")
from tactic.ui.container import ResizableTableWdg
table = ResizableTableWdg()
table.add_row()
td = table.add_cell(resize=False)
示例7: get_display
# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_id [as 别名]
#.........这里部分代码省略.........
button = ActionButtonWdg(title="Clear")
button.add_style("float: left")
button.add_style("margin: 0 10 3")
#button = ProdIconButtonWdg("Clear")
#button.add_style("margin: 5 10")
button.add_behavior( {
'type': 'click_up',
'cbjs_action': '''
spt.api.Utility.clear_inputs( bvr.src_el.getParent('.spt_js_editor') );
editAreaLoader.setValue('shelf_script', '');
'''
} )
button_div.add(button)
"""
div.add( "<br clear='all'/><br/>")
save_wdg = DivWdg()
div.add(save_wdg)
save_wdg.add_style("padding: 2px 5px 6px 5px")
#save_wdg.add_color("background", "background", -5)
# script code
save_span = Table()
save_wdg.add(save_span)
save_span.add_row()
code_span = SpanWdg()
code_span.add("<b>Code: </b>")
td = save_span.add_cell(code_span)
td.add_style("display: none")
code_text = TextInputWdg(name="shelf_code")
code_text.add_style("display: inline")
code_text.add_style("width: 100px")
code_text.set_value(script_code)
code_text.add_attr("readonly", "true")
code_text.set_id("shelf_code")
code_text.add_class("spt_code")
td = save_span.add_cell(code_text)
td.add_style("padding-top: 10px")
td.add_style("display: none")
save_span.add_cell(" ")
# script name (path??)
td = save_span.add_cell("<b>Script Path: </b>")
td.add_style("padding-top: 10px")
save_text = TextInputWdg(name="shelf_folder")
save_text.add_style("width: 250px")
save_text.set_id("shelf_folder")
save_text.add_class("spt_folder")
save_text.set_value(script_folder)
td = save_span.add_cell(save_text)
td.add_style("padding-top: 10px")
td = save_span.add_cell(" / ")
td.add_style("padding-top: 10px")
td.add_style("font-size: 1.5em")
save_text = TextInputWdg(name="shelf_title")
save_text.add_style("width: 350px")
save_text.add_attr("size", "40")
save_text.set_id("shelf_title")
save_text.add_class("spt_title")
save_text.set_value(script_name)
td = save_span.add_cell(save_text)
td.add_style("padding-top: 10px")
from tactic.ui.container import ResizableTableWdg
table = ResizableTableWdg()
table.add_row()
td = table.add_cell(resize=False)
td.add_style("vertical-align: top")
td.add(editor)
text = TextAreaWdg("shelf_script")
td = table.add_cell()
td.add_style('vertical-align: top')
td.add(my.get_script_wdg())
table.add_row(resize=False)
div.add(table)
if my.kwargs.get("is_refresh"):
return div
else:
return top