Skip to content

Commit

Permalink
REFACTOR: Browse to script file
Browse files Browse the repository at this point in the history
  • Loading branch information
ring630 committed Jan 15, 2025
1 parent 11e2fdd commit 9f94333
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/ansys/aedt/core/workflows/installer/extension_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import os
import sys
from tkinter import filedialog
import tkinter as tk
from tkinter import ttk

Expand Down Expand Up @@ -64,6 +65,11 @@
def create_toolkit_page(frame, window_name, internal_toolkits):
"""Create page to display toolkit on."""
# Available toolkits

def action_get_script_path():
file_selected = filedialog.askopenfilename(title="Select Wheelhouse")
input_file.insert(0, file_selected)

toolkits = ["Custom"] + internal_toolkits

max_length = max(len(item) for item in toolkits) + 1
Expand All @@ -88,7 +94,12 @@ def create_toolkit_page(frame, window_name, internal_toolkits):
toolkits_combo.grid(row=2, column=1, padx=5, pady=5)

# Create entry box for directory path
input_file_label = tk.Label(frame, text="Enter script path:")
"""input_file_label = tk.Label(frame, text="Enter script path:")
input_file_label.grid(row=3, column=0, padx=5, pady=5)
input_file = tk.Entry(frame)
input_file.grid(row=3, column=1, padx=5, pady=5)"""

input_file_label = tk.Button(frame, text="Enter script path:", command=action_get_script_path)
input_file_label.grid(row=3, column=0, padx=5, pady=5)
input_file = tk.Entry(frame)
input_file.grid(row=3, column=1, padx=5, pady=5)
Expand Down

0 comments on commit 9f94333

Please sign in to comment.