Hi, I’m trying to get an Eto form to show called by a script, but I get an “empty” form:
Here’s are the excerpts from the three scripts I’m using.
I’m importing all the necessary modules (designated by “import ...
”).
I created dialogs before that did work, but in one script, so not divided over several scripts.
I think therein lies the problem …
Can anybody help me fix this?
MAIN SCRIPT
import points as p
p.add_points()
POINTS MODULE
import ...
import interface as i
points_list = []
def add_points():
...
create_point()
def create_point():
dialog = AddPoint()
dialog.ShowModal(Rhino.UI.RhinoEtoApp.MainWindow)
print points_list
class AddPoint(Eto.Forms.Dialog):
def __INIT__(self):
...
self.point_name = i.txb(None)
button_ok = i.btn('OK')
botton_ok.Click += self.button_ok_click
...
layout = i.dyn()
layout.AddSeparateRow(i.lbl('Name:', self.point_name)
layout.AddSeparateRow(button_ok, ...)
self.Content = layout
def button_ok_click():
global points_list
name = self.point_name.Text
points_list.append(name)
self.Close()
INTERFACE SCRIPT
import ...
def btn(...):
# define button
def dyn(...):
# define dynamic layout
def lbl(...):
# define label
def txb(...):
# define text box
@nathanletwory, @curtisw, I hope you don’t mind me adding you to my post, but you helped me a lot in the past and I hope one of you can tell me what I’m doing wrong. Thanks.