当前位置: 首页>>代码示例>>Python>>正文


Python TextInputWdg.set_value方法代码示例

本文整理汇总了Python中tactic.ui.input.TextInputWdg.set_value方法的典型用法代码示例。如果您正苦于以下问题:Python TextInputWdg.set_value方法的具体用法?Python TextInputWdg.set_value怎么用?Python TextInputWdg.set_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tactic.ui.input.TextInputWdg的用法示例。


在下文中一共展示了TextInputWdg.set_value方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_text_input_wdg

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [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
开发者ID:2gDigitalPost,项目名称:custom-rewrite,代码行数:12,代码来源:metadata_report_wdg.py

示例2: get_text_input_wdg

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [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
开发者ID:2gDigitalPost,项目名称:custom-rewrite,代码行数:12,代码来源:input_widgets.py

示例3: get_text_input_wdg

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [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
开发者ID:2gDigitalPost,项目名称:custom-rewrite,代码行数:12,代码来源:prequal_eval_lines_wdg.py

示例4: get_timecode_textbox

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [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
开发者ID:2gDigitalPost,项目名称:custom-rewrite,代码行数:14,代码来源:prequal_eval_lines_wdg.py

示例5: get_text_input_wdg

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [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
开发者ID:2gDigitalPost,项目名称:custom-rewrite,代码行数:15,代码来源:utils.py

示例6: get_otherdb_wdg

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [as 别名]
    def get_otherdb_wdg(my):

        div = DivWdg()
        div.add_class("spt_db_options")
        div.add_attr("spt_vendor", "Other")
        div.add_style("margin: 20px")

        table = Table()
        div.add(table)
        table.add_color("color", "color")


        table.add_row()
        table.add_cell("Server: ")
        text = TextInputWdg(name="server")
        text.set_value("localhost")
        table.add_cell(text)
        server = Config.get_value("database", "server")
        if server:
            text.set_value(server)

        table.add_row()
        table.add_cell("Port: ")
        text = TextInputWdg(name="port")
        table.add_cell(text)
        port = Config.get_value("database", "port")
        if port:
            text.set_value(port)

        table.add_row()
        table.add_cell("Login: ")
        text = TextInputWdg(name="user")
        table.add_cell(text)
        user = Config.get_value("database", "user")
        if user:
            text.set_value(user)

        table.add_row()
        text = PasswordInputWdg(name="password")
        table.add_cell("Password: ")
        table.add_cell(text)
        password = Config.get_value("database", "password")
        if password:
            text.set_value(password)

        #from pyasm.search import Sql
        #sql.connect()

        return div
开发者ID:blezek,项目名称:TACTIC,代码行数:51,代码来源:db_config_wdg.py

示例7: get_sqlite_wdg

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [as 别名]
    def get_sqlite_wdg(my):
        div = DivWdg()
        div.add_class("spt_db_options")
        div.add_attr("spt_vendor", "Sqlite")
        div.add_style("padding: 20px")

        div.add("Database Folder: ")
        text = TextInputWdg(name="database/sqlite_db_dir")
        div.add(text)


        db_dir = Config.get_value("database", "sqlite_db_dir")
        if not db_dir:
            data_dir = Environment.get_data_dir()
            db_dir = "%s/db" % data_dir

        text.set_value(db_dir)

        return div
开发者ID:blezek,项目名称:TACTIC,代码行数:21,代码来源:db_config_wdg.py

示例8: get_info_wdg

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [as 别名]
    def get_info_wdg(my):

        div = DivWdg()
        div.set_name("Info")
        div.add_style("padding: 20px")

        
        table = Table()
        div.add(table)
        table.add_color("color", "color")
        #table.add_style("height: 280px")
        table.set_unique_id()

        table.add_smart_style("spt_table_header", "width", "200px")
        table.add_smart_style("spt_table_header", "text-align", "right")
        table.add_smart_style("spt_table_header", "padding-right", "20px")
        table.add_smart_style("spt_table_header", "margin-bottom", "10px")
        table.add_smart_style("spt_table_element", "vertical-align", "top")

        table.add_row()

        #if my.mode == 'insert':
        #    read_only = False
        #else:
        #    read_only = True
        read_only = False

        code = Config.get_value("install", "server") or ""

        td = table.add_cell()
        td.add_class("spt_table_header")
        td.add("Code: ")
        td.add_style("vertical-align: top")
        text = TextInputWdg(name="code", read_only=read_only)
        td = table.add_cell()
        td.add_class("spt_table_element")
        td.add(text)
        text.set_value(code)

        return div
开发者ID:blezek,项目名称:TACTIC,代码行数:42,代码来源:share_wdg.py

示例9: get_display

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [as 别名]
    def get_display(self):

        top = self.top
        self.set_as_panel(top)
        top.add_class("spt_ingestion_top")
        top.add_color("background", "background", -5)

        self.data = {}

        rules_div = DivWdg()
        top.add(rules_div)
        rules_div.add_style("padding: 10px")

        rules_div.add("Rules: ")

        rules_select = SelectWdg("rule_code")
        rule_code = self.get_value('rule_code')
        if rule_code:
            rules_select.set_value(rule_code)
        rules_select.set_option("query", "config/ingest_rule|code|title")
        rules_select.add_empty_option("-- New --")
        rules_div.add(rules_select)
        rules_select.add_behavior( {
        'type': 'change',
        'cbjs_action': '''
        var top = bvr.src_el.getParent(".spt_ingestion_top");
        value = bvr.src_el.value;
        var class_name = 'tactic.ui.tools.IngestionToolWdg';
        spt.panel.load(top, class_name, {rule_code: value} );
        '''
        } )

        rules_div.add("<hr/>")

        # read from the database
        if rule_code:
            search = Search("config/ingest_rule")
            search.add_filter("code", rule_code)
            sobject = search.get_sobject()
        else:
            sobject = None
        if sobject:
            self.data = sobject.get_value("data")
            if self.data:
                self.data = jsonloads(self.data)

        session_code = self.kwargs.get("session_code")
        if session_code:
            session = Search.get_by_code("config/ingest_session", session_code)
        else:
            if sobject:
                session = sobject.get_related_sobject("config/ingest_session")
                print("sobject: ", sobject.get_code(), sobject.get_value("spt_ingest_session_code"))
                print("parent: ", session)
            else:
                session = None


        if not session:
            #session = SearchType.create("config/ingest_session")
            #session.set_value("code", "session101")
            #session.set_value("location", "local")
            ##session.set_value("base_dir", "C:")
            top.add("No session defined!!!")
            return top



        rule = ""
        filter = ""
        ignore = ""


        # get the base path
        if sobject:
            base_dir = sobject.get_value("base_dir")
        else:
            base_dir = ''

        #else:
        #    base_dir = self.get_value("base_dir")
        #if not base_dir:
        #    base_dir = ''

        if sobject:
            title = sobject.get_value("title")
        else:
            title = ''

        if sobject:
            code = sobject.get_value("code")
        else:
            code = ''


        file_list = self.get_value("file_list")
        scan_type = self.get_value("scan_type")
        action_type = self.get_value("action_type")
        rule = self.get_value("rule")
        if not rule:
#.........这里部分代码省略.........
开发者ID:mincau,项目名称:TACTIC,代码行数:103,代码来源:ingestion_wdg.py

示例10: get_nav_wdg

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [as 别名]
    def get_nav_wdg(self):

        #base_dir = self.kwargs.get("base_dir")
        #location = self.kwargs.get("location")
        base_dir = self.session.get_value("base_dir")
        location = self.session.get_value("location")

        nav_wdg = DivWdg()

        nav_wdg.add("<b>Session 101 - Clean up self Crap</b><hr/>")
    

        nav_wdg.add_style("margin-bottom: 10px")
        nav_wdg.add_class("spt_file_nav")
        nav_wdg.add_style("width: 575px")
        nav_wdg.add_border()
        nav_wdg.set_round_corners()
        nav_wdg.add_style("padding: 5px")

        button = ActionButtonWdg(title="Scan", tip="Scan for files in specified folder")
        button.add_style("float: right")
        button.add_style("margin-top: -5px")
        nav_wdg.add(button)


        from tactic.ui.input import TextInputWdg
        title_wdg = "Session Title: "
        nav_wdg.add(title_wdg)
        text = TextInputWdg(name="title")
        text.add_class("spt_title")
        text.add_style("width: 300px")
        nav_wdg.add(text)

        nav_wdg.add("<br/><br/>")


        folder_wdg = "Base folder of this session: "
        nav_wdg.add(folder_wdg)

        text = TextInputWdg(name="base_dir")
        text.add_class("spt_base_dir")
        text.add_style("width: 300px")
        if base_dir:
            text.set_value(base_dir)
        nav_wdg.add(text)

        # add a hidden paths variable
        text = HiddenWdg("paths")
        text.add_class("spt_paths")
        nav_wdg.add(text)

        nav_wdg.add("<br/>")

        # add a hidden paths variable
        select = SelectWdg("location")
        if location:
            select.set_value(location)
        nav_wdg.add("<br/>")
        nav_wdg.add("Folder is on ")
        nav_wdg.add(select)
        select.set_option("values", "local|server")

        
        button.add_behavior( {
        'type': 'click_up',
        'cbjs_action': '''

        var top = bvr.src_el.getParent(".spt_ingestion_top");
        var nav = top.getElement(".spt_file_nav");

        var nav_values = spt.api.Utility.get_input_values(nav,null,false);

        var base_dir = nav_values.base_dir;
        var location = nav_values.location;

        spt.app_busy.show("Scanning", base_dir);

        if (location == 'local') {
            var applet = spt.Applet.get();
            var paths = applet.list_dir(base_dir, 2);
            var paths_el = nav.getElement(".spt_paths");
            var js_paths = [];
            for (var i = 0; i < paths.length; i++) {
                var js_path = paths[i].replace(/\\\\/g,"/");
                if (applet.is_dir(js_path) ) {
                    js_path = js_path + '/';
                    js_paths.push(js_path);
                }
                //if (i > 100) break;
                else {
                    js_paths.push(js_path);
                }
            }

            paths_el.value = js_paths.join("|");

        }

        //var nav_values = spt.api.Utility.get_input_values(nav,null,false);
        //spt.panel.refresh(top, nav_values);
#.........这里部分代码省略.........
开发者ID:mincau,项目名称:TACTIC,代码行数:103,代码来源:ingestion_wdg.py

示例11: get_display

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [as 别名]

#.........这里部分代码省略.........
        #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: &nbsp;</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("&nbsp;&nbsp;")

        # script name (path??)
        save_span.add_cell("<b>Script Path: &nbsp;</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("&nbsp; / &nbsp;")
        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()
开发者ID:2gDigitalPost,项目名称:tactic_src,代码行数:70,代码来源:shelf_wdg.py

示例12: get_display

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [as 别名]
    def get_display(my):

        top = my.top
        top.add_class("spt_sign_in_top")


        top.add_color("background", "background")
        top.add_style("padding: 30px")
        top.add_style("width: 300px")


        icon = IconWdg("Not signed in", IconWdg.WARNING)
        top.add(icon)

        top.add("You are not signed into Perforce.")
        top.add("<br/>"*2)


        table = Table()
        top.add(table)


        from tactic.ui.input import TextInputWdg, PasswordInputWdg

        table.add_row()
        td = table.add_cell("Port: ")
        td.add_style("width: 75px")

        text = TextInputWdg(name="port")
        table.add_cell(text)
        text.set_value("1666")

        tr = table.add_row()
        table.add_row_cell("&nbsp;")

        table.add_row()
        td = table.add_cell("Login: ")
        td.add_style("width: 75px")

        text = TextInputWdg(name="user")
        table.add_cell(text)
        user = Environment.get_user_name()
        text.set_value(user)

        table.add_row()

        table.add_cell("Password: ")

        text = PasswordInputWdg(name="password")
        table.add_cell(text)

        tr = table.add_row()
        table.add_row_cell("&nbsp;")

        tr = table.add_row()
        table.add_cell("Workspace: ")
        text = TextInputWdg(name="workspace")
        table.add_cell(text)
        text.add_class("spt_workspace")



        top.add("<br/>"*2)


        button = ActionButtonWdg(title="Sign In", icon=IconWdg.PUBLISH, size='medium')
        top.add(button)
        button.add_style("float: right")


        button.add_behavior( {
            'type': 'click_up',
            'cbjs_action': '''
            var top = bvr.src_el.getParent(".spt_sign_in_top");
            var values = spt.api.get_input_values(top);

            var port = values.port[0];
            var user = values.user[0];
            var password = values.password[0];
            var client = values.workspace[0];

            // login in user
            spt.scm.port = port;
            spt.scm.user = user;
            spt.scm.password = password;
            spt.scm.client = client;


            // test the connection
            var ping = spt.scm.ping();
            if (ping != "OK") {
                spt.scm.show_login();
                return;
            }

            // TODO: get the workspaces and use this as a list
            // For now, just fill it in with the first one
            if (!client) {
                var workspaces = spt.scm.get_workspaces();
                if (workspaces.length > 0) {
#.........这里部分代码省略.........
开发者ID:blezek,项目名称:TACTIC,代码行数:103,代码来源:scm_dir_list_wdg.py

示例13: get_display

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [as 别名]
    def get_display(self):

        top = self.top
        top.add_class("spt_sign_in_top")


        top.add_color("background", "background")
        top.add_style("padding: 30px")
        top.add_style("width: 300px")


        icon = IconWdg("Not signed in", IconWdg.WARNING)
        top.add(icon)

        top.add("You are not signed into Perforce.")
        top.add("<br/>"*2)


        table = Table()
        top.add(table)


        from tactic.ui.input import TextInputWdg, PasswordInputWdg

        table.add_row()
        td = table.add_cell("Port: ")
        td.add_style("width: 75px")

        text = TextInputWdg(name="port")
        td = table.add_cell(text)
        td.add_style("vertical-align: top")
        text.set_value("1666")


        table.add_row()
        td = table.add_cell("Login: ")
        td.add_style("vertical-align: top")
        td.add_style("width: 75px")

        text = TextInputWdg(name="user")
        td = table.add_cell(text)
        td.add_style("vertical-align: top")
        user = Environment.get_user_name()
        text.set_value(user)

        table.add_row()

        td = table.add_cell("Password: ")
        td.add_style("vertical-align: top")

        text = PasswordInputWdg(name="password")
        table.add_cell(text)

        tr = table.add_row()
        table.add_row_cell("&nbsp;")


        tr = table.add_row()
        tr.add_class("spt_workspaces")
        #tr.add_style("display: none")
        td = table.add_cell("Workspace: ")
        td.add_style("vertical-align: top")

        workspaces = self.kwargs.get("workspaces")
        td = table.add_cell()
        button = ActionButtonWdg(width='55', title="Lookup")
        td.add(button)
        button.add_style("float: right")

        button.add_behavior( {
            'type': 'click_up',
            'cbjs_action': '''
            try {
                var workspaces = spt.scm.get_workspaces();

                var clients = [];
                for (var i = 0; i < workspaces.length; i++) {
                    clients.push(workspaces[i].client);
                }
                clients = clients.join("|");
                var kwargs = {
                    workspaces: clients
                }
                spt.scm.show_login(kwargs);
            }
            catch(e) {
                spt.scm.signout_user();
                spt.scm.show_login();
            }
            '''
        } )

        if not workspaces:
            text = TextInputWdg(name="workspace")
            text.add_style("width: 165px")
            td.add(text)

        else:
            select = SelectWdg("workspace")
            td.add(select)
#.........这里部分代码省略.........
开发者ID:mincau,项目名称:TACTIC,代码行数:103,代码来源:scm_dir_list_wdg.py

示例14: get_display

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [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: &nbsp;</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("&nbsp;&nbsp;")

        # script name (path??)
        td = save_span.add_cell("<b>Script Path: &nbsp;</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("&nbsp; / &nbsp;")
        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
开发者ID:0-T-0,项目名称:TACTIC,代码行数:104,代码来源:shelf_wdg.py

示例15: get_display

# 需要导入模块: from tactic.ui.input import TextInputWdg [as 别名]
# 或者: from tactic.ui.input.TextInputWdg import set_value [as 别名]

#.........这里部分代码省略.........
                    process_ypos = process.get_attribute('ypos')

                    task_pipeline_code = process.get_task_pipeline()
                    if task_pipeline_code != "task":
                        task_pipeline = Search.get_by_code("sthpw/pipeline", task_pipeline_code)
                    else:
                        task_pipeline = None
                else:
                    task_pipeline_code = "task"
                    task_pipeline = None

                
                process_div = DivWdg()
                process_div.add_style("float: left")
                process_div.add_class("spt_process_top")


                if i == 0:
                    dyn_list.add_template(process_div)
                else:
                    dyn_list.add_item(process_div)

                #process_div.add_style("padding-left: 10px")
                #process_div.add_style("margin: 5px")

                table = Table()
                process_div.add(table)
                table.add_row()

                text = TextInputWdg(name="process")
                process_cell = table.add_cell(text)
                text.add_style("width: 95px")
                text.add_style("margin: 5px")
                text.set_value(process_name)
                text.add_class("spt_process")

                # the template has a border
                if i == 0:
                    text.add_style("border: solid 1px #AAA")

                hidden = HiddenWdg(name='process_type')
                hidden.set_value(process_type)
                process_cell.add(hidden)

                hidden = HiddenWdg(name='process_xpos')
                hidden.set_value(process_xpos)
                process_cell.add(hidden)

                hidden = HiddenWdg(name='process_ypos')
                hidden.set_value(process_ypos)
                process_cell.add(hidden)


                text = TextInputWdg(name="description")
                table.add_cell(text)
                text.add_style("width: 175px")
                text.add_style("margin: 5px")
                text.set_value(description)
                # the template has a border
                if i == 0:
                    text.add_style("border: solid 1px #AAA")

                
                if process_type in ['manual','approval']:
                    read_only = False
                else:
开发者ID:mincau,项目名称:TACTIC,代码行数:70,代码来源:pipeline_edit_wdg.py


注:本文中的tactic.ui.input.TextInputWdg.set_value方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。