32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
# target_simulator/gui/scenario_controls_frame.py
|
|
|
|
"""
|
|
A frame containing widgets for managing scenarios (loading, saving, deleting).
|
|
"""
|
|
|
|
import tkinter as tk
|
|
from tkinter import ttk
|
|
|
|
class ScenarioControlsFrame(ttk.LabelFrame):
|
|
"""Frame for scenario management controls."""
|
|
|
|
def __init__(self, master):
|
|
super().__init__(master, text="Scenario Management")
|
|
|
|
self.columnconfigure(1, weight=1)
|
|
|
|
# --- Widgets ---
|
|
ttk.Label(self, text="Scenario:").grid(row=0, column=0, padx=(5, 0), pady=5, sticky=tk.W)
|
|
|
|
self.scenario_combobox = ttk.Combobox(self, state="readonly")
|
|
self.scenario_combobox.grid(row=0, column=1, padx=5, pady=5, sticky=tk.EW)
|
|
|
|
# --- Buttons ---
|
|
button_frame = ttk.Frame(self)
|
|
button_frame.grid(row=1, column=0, columnspan=2, pady=5, sticky=tk.W)
|
|
|
|
self.save_button = ttk.Button(button_frame, text="Save Current...")
|
|
self.save_button.pack(side=tk.LEFT, padx=5)
|
|
|
|
self.delete_button = ttk.Button(button_frame, text="Delete Selected")
|
|
self.delete_button.pack(side=tk.LEFT, padx=5) |