Reihenfolge der Bedienelemente umgestellt.

This commit is contained in:
2024-07-23 13:32:57 +02:00
parent 75a1f05dc8
commit 2afb5fa266

12
main.py
View File

@@ -97,28 +97,28 @@ class ArduinoGUI:
# Labels and ComboBox for Stellantriebstyp # Labels and ComboBox for Stellantriebstyp
self.stellantriebstyp_label = customtkinter.CTkLabel(self.root, text="Stellantriebstyp:", font=self.my_font) self.stellantriebstyp_label = customtkinter.CTkLabel(self.root, text="Stellantriebstyp:", font=self.my_font)
self.stellantriebstyp_label.grid(row=2, column=0, padx=(10, 5), pady=(10, 0), sticky="w") self.stellantriebstyp_label.grid(row=3, column=0, padx=(10, 5), pady=(10, 0), sticky="w")
self.config_combobox_value = customtkinter.StringVar() self.config_combobox_value = customtkinter.StringVar()
self.config_combobox = customtkinter.CTkComboBox(self.root, variable=self.config_combobox_value, state="readonly", font=self.my_font) self.config_combobox = customtkinter.CTkComboBox(self.root, variable=self.config_combobox_value, state="readonly", font=self.my_font)
self.config_combobox.grid(row=2, column=1, columnspan=1, padx=(0, 10), pady=(10, 0), sticky="ew") self.config_combobox.grid(row=3, column=1, columnspan=1, padx=(0, 10), pady=(10, 0), sticky="ew")
#self.config_combobox.bind("<<ComboboxSelected>>", self.on_config_selected) #self.config_combobox.bind("<<ComboboxSelected>>", self.on_config_selected)
# Setzen Button für Stellantriebstyp # Setzen Button für Stellantriebstyp
self.set_pid_button = customtkinter.CTkButton(self.root, text="Setzen", command=self.set_pid_parameters, font=self.my_font) self.set_pid_button = customtkinter.CTkButton(self.root, text="Setzen", command=self.set_pid_parameters, font=self.my_font)
self.set_pid_button.grid(row=2, column=2, padx=(0, 10), pady=(10, 0), sticky="ew") self.set_pid_button.grid(row=3, column=2, padx=(0, 10), pady=(10, 0), sticky="ew")
# Labels and ComboBox for COM Port # Labels and ComboBox for COM Port
self.com_label = customtkinter.CTkLabel(self.root, text="COM Port:", font=self.my_font) self.com_label = customtkinter.CTkLabel(self.root, text="COM Port:", font=self.my_font)
self.com_label.grid(row=3, column=0, padx=(10, 5), pady=(10, 0), sticky="w") self.com_label.grid(row=2, column=0, padx=(10, 5), pady=(10, 0), sticky="w")
self.combobox_value = customtkinter.StringVar() self.combobox_value = customtkinter.StringVar()
self.combobox = customtkinter.CTkComboBox(self.root, variable=self.combobox_value, font=self.my_font) self.combobox = customtkinter.CTkComboBox(self.root, variable=self.combobox_value, font=self.my_font)
self.combobox.configure(values=[port.device for port in self.ports]) self.combobox.configure(values=[port.device for port in self.ports])
self.combobox.grid(row=3, column=1, padx=(0, 10), pady=(10, 0), sticky="ew") self.combobox.grid(row=2, column=1, padx=(0, 10), pady=(10, 0), sticky="ew")
self.connect_button = customtkinter.CTkButton(self.root, text="Verbinden", command=self.connect_arduino, font=self.my_font) self.connect_button = customtkinter.CTkButton(self.root, text="Verbinden", command=self.connect_arduino, font=self.my_font)
self.connect_button.grid(row=3, column=2, padx=(0, 10), pady=(10, 0), sticky="ew") self.connect_button.grid(row=2, column=2, padx=(0, 10), pady=(10, 0), sticky="ew")
# Setpoint entry # Setpoint entry
self.setpoint_label = customtkinter.CTkLabel(self.root, text="Sollwerteingabe in Nm:", font=self.my_font) self.setpoint_label = customtkinter.CTkLabel(self.root, text="Sollwerteingabe in Nm:", font=self.my_font)