import rhinoscriptsyntax as rs
import Rhino.UI
import Eto.Drawing as drawing
import Eto.Forms as forms
__commandname__ = "FindHole"
class SimpleEtoDialog(forms.Dialog):
def __init__(self):
self.Title = "Sample Eto Dialog"
self.ClientSize = drawing.Size(200, 200)
self.Padding = drawing.Padding(5)
self.Resizable = False
layout = forms.DynamicLayout()
layout.Padding = drawing.Padding(5)
layout.Spacing = drawing.Size(5, 5)
layout.AddRow(forms.Label(Text ="i !"))
layout.AddRow(forms.Label(Text ="am"))
layout.AddRow(forms.Label(Text ="NOT"))
layout.AddRow(forms.Label(Text ="WORKING!"))
################################################################################
# Creating a dialog instance and displaying the dialog.
################################################################################
def TestSampleEtoDialog():
dialog = SimpleEtoDialog()
dialog.ShowModal(Rhino.UI.RhinoEtoApp.MainWindow)
################################################################################
# Check to see if this file is being executed as the "main" python
# script instead of being used as a module by some other python script
# This allows us to use the module which ever way we want.
################################################################################
if __name__ == "__main__":
TestSampleEtoDialog()
i simply try to edit a ETO sample but other than changing the string i cannot understand the correlation from Layout and effect
I have really used Eto only with F# and C#, but it should be pretty straightforward to learn from examples in those languages, then transform to information into Python versions.