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


Python LabelFrame.forget方法代码示例

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


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

示例1: BoardConfig

# 需要导入模块: from Tkinter import LabelFrame [as 别名]
# 或者: from Tkinter.LabelFrame import forget [as 别名]

#.........这里部分代码省略.........
        frame_left0.pack(expand=True, fill=BOTH, side=LEFT)

        frame_right0 = Frame(self.frame_32b)
        frame_right0.pack(expand=True, fill=BOTH, side=RIGHT)

        parent = frame_left0  #left
        for board in arch_32:
            if arch_32.index(board) == (len(arch_32) / 2) + 1:
                parent = frame_right0  #rigth

            radio = Radiobutton(parent, text=board.name, anchor="w", width=10, value=board.name, variable=self.dev32_var, command=lambda :self.set_board_name(board.name, "32"))
            radio.pack(expand=True, fill=X, side=TOP)

            #radio = QtGui.QRadioButton(self.board_config.groupBox_devices_32)
            #self.board_config.gridLayout_device_32.addWidget(radio, count, side, 1, 1)
            #radio.setText(board.name)
            #radio.setToolTip(board.proc)

            if name_checked == board.name: radio.select()
            #self.connect(radio, QtCore.SIGNAL("clicked()"), self.set_board_name(board.name, "32"))



    #----------------------------------------------------------------------
    def load_config(self):

        self.main.configIDE.load_config()

        arch = self.main.configIDE.config("Board", "arch", 8)
        getattr(self.radioButton_arch_8, "select" if (arch == 8) else "deselect")()
        getattr(self.radioButton_arch_32, "select" if (arch == 32) else "deselect")()

        if arch == 32: self.advanceoptions.pack(fill=X, expand=True, side=BOTTOM)
        else: self.advanceoptions.forget()

        mode = self.main.configIDE.config("Board", "mode", "bootloader")
        getattr(self.radioButton_mode_bootloader, "select" if (mode == "bootloader") else "deselect")()
        getattr(self.radioButton_mode_icsp, "select" if (mode == "icsp") else "deselect")()

        bootloader = self.main.configIDE.config("Board", "bootloader", "v1_v2")
        getattr(self.radioButton_bootloader_v1_v2, "select" if (bootloader == "v1_v2") else "deselect")()
        getattr(self.radioButton_bootloader_v4, "select" if (bootloader == "v4") else "deselect")()

        self.update_mode()


    #----------------------------------------------------------------------
    def update_mode(self):

        mode_boot = self.mode_var.get() == "bootloader"
        arch_8 = self.arch_var.get() == 8

        if mode_boot and arch_8: self.lf_boot.pack(fill=X, expand=True, side=TOP)
        else: self.lf_boot.forget()
        self.init_groups()

        if not mode_boot:
            self.label_warning.configure(text="WARNING!! this mode can overwite the bootloader code.")
        else:
            self.label_warning.configure(text="")



    #----------------------------------------------------------------------
    def set_board_name(self, name, arch):
开发者ID:PinguinoIDE,项目名称:pinguino-ide-tk,代码行数:69,代码来源:board_config.py


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