當前位置: 首頁>>代碼示例>>Python>>正文


Python TextAreaWdg.set_id方法代碼示例

本文整理匯總了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
開發者ID:mincau,項目名稱:TACTIC,代碼行數:35,代碼來源:search_type_manager_wdg.py

示例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
開發者ID:2gDigitalPost,項目名稱:custom-rewrite,代碼行數:15,代碼來源:order_builder_utils.py

示例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
開發者ID:2gDigitalPost,項目名稱:custom-rewrite,代碼行數:18,代碼來源:metadata_report_wdg.py

示例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
開發者ID:2gDigitalPost,項目名稱:custom-rewrite,代碼行數:18,代碼來源:element_eval_wdg.py

示例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;
#.........這裏部分代碼省略.........
開發者ID:mincau,項目名稱:TACTIC,代碼行數:103,代碼來源:ckeditor_wdg.py


注:本文中的pyasm.widget.TextAreaWdg.set_id方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。