metricFrame=ttk.Frame(rankedFrame,style='Test.TFrame',height=200,width=frameWidth)# Frame for each metric, should cover 80% of the window and stack vertically
metricFrame=ttk.Frame(frame,style='Test.TFrame',height=200,width=canvasWidth,padding=5)# Frame for each metric, should cover 80% of the window and stack vertically
metricFrame.grid(padx=10,pady=10,sticky="nsew")
metricFrame.grid(padx=10,pady=10,sticky="nsew")
metricFrame.grid_rowconfigure(0,weight=1)
metricFrame.grid_columnconfigure(0,weight=1)
metricFrame.grid_columnconfigure(0,weight=1)
rowIndex+=1# Increment the row index for the next frame
rowIndex+=1# Increment the row index for the next frame
ttk.Label(metricFrame,text=f"Metric Name: {metricName}",style="Test.TLabel").grid(row=1,column=0,sticky="nw")# First label = Metric id and description
ttk.Label(metricFrame,text=f"Metric Name: {metricName}",style="Test.TLabel").grid(row=1,column=0,sticky="nw")# First label = Metric id and description
ttk.Label(metricFrame,text=f"Metric value: {metricValue}",style="Test.TLabel",wraplength=0.5*frameWidth).grid(row=2,column=0,sticky="nw")# First label = Metric id and description
ttk.Label(metricFrame,text=f"Metric value: {metricValue}",style="Test.TLabel",wraplength=0.5*canvasWidth).grid(row=2,column=0,sticky="nw")# First label = Metric id and description
ttk.Label(metricFrame,text=f"Number of associated components: {amountOFComponents}",style="Test.TLabel").grid(row=1,column=2,sticky="n")# Second label = Number of associated components in both diagrams
ttk.Label(metricFrame,text=f"Number of associated components: {amountOFComponents}",style="Test.TLabel").grid(row=1,column=2,sticky="n")# Second label = Number of associated components in both diagrams
ttk.Label (metricFrame,text=f"Last update: {metricDate}",style="Test.TLabel").grid(row=2,column=2,sticky="e")# Third label = Last update of the metric
ttk.Label (metricFrame,text=f"Last update: {metricDate}",style="Test.TLabel").grid(row=2,column=2,sticky="e")# Third label = Last update of the metric
forchildinmetricFrame.winfo_children():
forchildinmetricFrame.winfo_children():
child.grid_configure(padx=3,pady=3,)
child.grid_configure(padx=3,pady=3)
child.grid_columnconfigure(0,weight=3)
returnrankedFrame
returnframe
guiRoot=Tk()
guiRoot.title("Indicator Analyzer for SSC Risk")
deffindMetrics(diagram,id:int,typeOfObject:str):
guiRoot.geometry("600x300")
relevantMetrics=[]
label=ttk.Label(guiRoot,text="Welcome to the Indicator Analyzer for SSC Risk",font=("Arial",20))