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


Python Frame.lift方法代码示例

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


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

示例1: __init__

# 需要导入模块: from tkinter import Frame [as 别名]
# 或者: from tkinter.Frame import lift [as 别名]

#.........这里部分代码省略.........

        self.parameter_frame.place(height=135, width=630, x=10, y=125)
        self.setpoint_label.place(height=25, width=200, x=10, y=10)
        self.setpoint_entry.place(height=25, width=200, x=215, y=10)
        self.setpoint_setter_button.place(height=25, width=200, x=420, y=10)
        self.power_output_label.place(height=25, width=200, x=10, y=40)
        self.power_output_entry.place(height=25, width=200, x=215, y=40)
        self.power_output_setter_button.place(height=25, width=200, x=420, y=40)
        self.mode_switcher_button.place(height=25, width=405, x=215, y=70)
        self.mode_label.place(height=25, width=200, x=10, y=70)
        self.external_sensor_mode_label.place(height=25, width=200, x=10, y=100)
        self.external_sensor_mode_button.place(height=25, width=200, x=215, y=100)
        self.hold_temperature_button.place(height=25, width=200, x=420, y=100)

        self.sensor_frame.place(height=135, width=220, x=10, y=270)
        self.oven_temperature_label.place(height=25, width=200, x=10, y=10)
        self.external_temperature_label.place(height=25, width=200, x=10, y=40)
        self.working_setpoint_label.place(height=25, width=200, x=10, y=70)
        self.working_output_label.place(height=25, width=200, x=10, y=100)

        self.log_frame.place(height=135, width=400, x=240, y=270)
        self.log_text.place(height=115, width=380, x=10, y=10)

        self.plot_frame.place(x=640, y=10, width=360, height=395)
        self.switch_plot_left_button.place(x=5, y=5, height=30, width=30)
        self.switch_plot_right_button.place(x=325, y=5, height=30, width=30)
        self.plot_label.place(x=35, y=5, height=25, width=295)
        self.pyrometer_plot_frame.place(x=5, y=40, width=350, height=350)
        self.oven_temperature_plot_frame.place(x=5, y=40, width=350, height=350)
        self.power_ouput_plot_frame.place(x=5, y=40, width=350, height=350)
        self.pyrometer_plot.place(x=0, y=0, width=350, height=350)
        self.oven_temperature_plot.place(x=0, y=00, width=350, height=350)
        self.power_ouput_plot.place(x=0, y=0, width=350, height=350)
        self.oven_temperature_plot_frame.lift()

    def start_label_updater(self):
        """Read values from instrument objects every second, display them, plot them and write in a logfile"""
        self.start_time = datetime.now()

        def update_labels():
            while True:
                pyrometer_temperature = "---"
                oven_temperature = "---"
                working_output = "---"
                working_setpoint = "---"

                runtime = (datetime.now() - self.start_time).seconds / 60.0

                if self.PLD is not None:
                    oven_temperature = self.PLD.oven_temp.get()
                    self.oven_temperature_plot.add_datapoint(runtime, oven_temperature)
                    self.oven_temperature_label.configure(text="Oven temperature: %s °C" % oven_temperature)
                    working_output = self.PLD.working_output.get()
                    self.power_ouput_plot.add_datapoint(runtime, working_output)
                    self.working_output_label.configure(text="Working output: %s %%" % working_output)
                    working_setpoint = self.PLD.working_setpoint.get()
                    self.working_setpoint_label.configure(text="Working setpoint: %s °C" % working_setpoint)

                if self.pyrometer is not None:
                    pyrometer_temperature = self.pyrometer.temperature.get()
                    self.pyrometer_plot.add_datapoint(runtime, pyrometer_temperature)
                    self.external_temperature_label.configure(text="Sample temperature %s °C" % pyrometer_temperature)

                logstring = "Time: " + strftime("%X") \
                            + ("Oven temperature: %s °C" % oven_temperature).ljust(28, " ") \
                            + ("Power Output %s %%" % working_output).ljust(28, " ")\
开发者ID:AlexSchmid22191,项目名称:Eurotherm,代码行数:70,代码来源:GUI.py


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