本文整理汇总了Python中pyasm.widget.TextAreaWdg.set_id方法的典型用法代码示例。如果您正苦于以下问题:Python TextAreaWdg.set_id方法的具体用法?Python TextAreaWdg.set_id怎么用?Python TextAreaWdg.set_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasm.widget.TextAreaWdg
的用法示例。
在下文中一共展示了TextAreaWdg.set_id方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_advanced_definition_wdg
# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_id [as 别名]
def get_advanced_definition_wdg(self):
# add the advanced entry
advanced = DivWdg()
advanced.add_style("margin-top: 10px")
advanced.add_style("padding: 10px")
advanced.add_border()
title = DivWdg()
title.add_style("color: black")
title.add("Advanced - XML Column Definition")
title.add_style("margin-top: -23")
advanced.add(title)
advanced.add("<br/>")
input = TextAreaWdg("config_xml")
input.set_id("config_xml")
input.set_option("rows", "10")
input.set_option("cols", "70")
input.set_value(self.config_string)
advanced.add(input)
advanced.add(HtmlElement.br(2))
button_div = DivWdg()
button_div.add_style("text-align: center")
button = ActionButtonWdg(title="Save Definition")
#button = ProdIconButtonWdg("Save Definition")
button.add_event("onclick", "spt.custom_project.save_definition_cbk()")
button_div.add(button)
button_div.add_style("margin-left: 130px")
advanced.add(button_div)
return advanced
示例2: get_text_area_input_wdg
# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_id [as 别名]
def get_text_area_input_wdg(name, width=400, styles=None):
textarea_wdg = TextAreaWdg()
textarea_wdg.set_id(name)
textarea_wdg.set_name(name)
textarea_wdg.add_style('width', '{0}px'.format(width))
if styles is None:
styles = []
for style in styles:
textarea_wdg.add_style(style[0], style[1])
return textarea_wdg
示例3: get_text_area_input_wdg
# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_id [as 别名]
def get_text_area_input_wdg(self, name, id):
text_area_wdg = TextAreaWdg()
text_area_wdg.set_id(id)
if hasattr(self, id):
text_area_wdg.set_value(getattr(self, id))
text_area_div = DivWdg(name)
text_area_div.add_style('font-weight', 'bold')
section_div = DivWdg()
section_div.add_style('margin', '10px')
section_div.add(text_area_div)
section_div.add(text_area_wdg)
return section_div
示例4: get_general_comments_section
# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_id [as 别名]
def get_general_comments_section(self):
general_comments_div = DivWdg()
general_comments_div.add_style('margin', '10px')
general_comments_wdg = TextAreaWdg()
general_comments_wdg.set_id('general_comments')
general_comments_wdg.set_name('general_comments')
if hasattr(self, 'general_comments'):
general_comments_wdg.set_value(self.general_comments)
general_comments_text_div = DivWdg('General Comments')
general_comments_text_div.add_style('font-weight', 'bold')
general_comments_div.add(general_comments_text_div)
general_comments_div.add(general_comments_wdg)
return general_comments_div
示例5: CKEditorWdg
# 需要导入模块: from pyasm.widget import TextAreaWdg [as 别名]
# 或者: from pyasm.widget.TextAreaWdg import set_id [as 别名]
class CKEditorWdg(BaseRefreshWdg):
def init(self):
name = self.kwargs.get("name")
assert(name)
self.text = TextAreaWdg(name)
self.text_id = self.kwargs.get("text_id")
if not self.text_id:
self.text_id = self.text.set_unique_id()
def get_display(self):
top = self.top
top.add_style("min-width: 600px")
top.add_class("spt_ckeditor_top")
top.add_attr("text_id", self.text_id)
top.add(self.text)
value = self.kwargs.get("value")
if value:
self.text.set_value(value)
self.text.add_style("width: 100%")
self.text.add_style("height: 100%")
self.text.add_style("min-height: 500px")
self.text.add_style("display: none")
self.text.set_id(self.text_id)
self.text.add_behavior( {
'type': 'load',
'color': self.text.get_color("background", -10),
'text_id': self.text_id,
'cbjs_action': '''
/*
var js_file = "ckeditor/ckeditor.js";
var url = "/context/spt_js/" + js_file;
var js_el = document.createElement("script");
js_el.setAttribute("type", "text/javascript");
js_el.setAttribute("src", url);
var head = document.getElementsByTagName("head")[0];
head.appendChild(js_el);
*/
var init = function() {
CKEDITOR.on( 'instanceReady', function( ev )
{
ev.editor.dataProcessor.writer.indentationChars = ' ';
});
var config = {
toolbar: 'Full',
uiColor: bvr.color,
height: '800px'
};
/*
config.toolbar_Full =
[
['Source'],
//['Cut','Copy','Paste'],
['Undo','Redo','-','Find','Replace'],
['Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
'/',
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['HorizontalRule','SpecialChar'],
['Styles','Format','FontSize'],
['TextColor','BGColor'],
['Maximize', 'ShowBlocks']
];
*/
config.toolbar_Full =
[
{ name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton',
'HiddenField' ] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
'/',
{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
];
config.entities = false;
config.basicEntities = false;
#.........这里部分代码省略.........