Hello,
AI is not helping me well… how to run this window
import clr
clr.AddReference('DynamoCore')
from Dynamo.Graph.Nodes import *
clr.AddReference("PresentationFramework")
from System.Windows import Application, Window, Thickness
from System.Windows.Controls import ComboBox
class MainWindow(Window):
def __init__(self):
self.Title = "My App"
self.Width = 200
self.Height = 100
self.Padding = Thickness(10)
self.widget = ComboBox()
self.widget.Items.Add("walls")
self.widget.Items.Add("Floors")
self.widget.Items.Add("Columns")
self.widget.Items.Add("Roofs")
self.widget.SelectionChanged += self.index_changed
self.Content = self.widget
def index_changed(self, sender, e):
return (self.widget.SelectedIndex)
# Dynamo entry point
def RunScript():
app = Application.Current
if app is None:
app = Application()
window = MainWindow()
app.Run(window)
OUT = "Script completed."
at least i have no error
KR
Andreas