Traceback:
line 26, in init, “C:\Users\bunner\OneDrive - Sealed Air Corporation\Computer\Desktop\Test User Form\Rhino ETO Example.py”
line 132, in RequestRoomNumber, “C:\Users\bunner\OneDrive - Sealed Air Corporation\Computer\Desktop\Test User Form\Rhino ETO Example.py”
line 145, in , “C:\Users\bunner\OneDrive - Sealed Air Corporation\Computer\Desktop\Test User Form\Rhino ETO Example.py”
It doesn’t appear to like the line grouplayout.Spacing = Size(3, 3)
Edit:
Sorry after reading through the example, i see that the example does not have the namespace either on the GroupBox example, which is wrong. In the ImageView example you can see drawing.Size being used.
@scottd, as you have last modified the example can you fix the GroupBox example code?
I did finally figure that out. (grouplayout.Spacing = drawing.Size(3, 3))
Are there any other resources on how to work with group boxes? I cannot determine how the code should be written for a group box and the items within the group box. An example would be good if one is available somewhere. The example posted in that page leaves a lot to the imagination.
I constructed this code from a couple examples. It runs but no group box. Something is missing?
import Rhino.UI
import Eto.Drawing as drawing
import Eto.Forms as forms
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 = True
label = forms.Label()
label.Text = "Hello Rhino.Python!"
self.Content = label
# Create a group box
self.m_groupbox = forms.GroupBox(Text = 'Groupbox')
self.m_groupbox.Padding = drawing.Padding(5)
grouplayout = forms.DynamicLayout()
grouplayout.Spacing = drawing.Size(3, 3)
label1 = forms.Label(Text = 'Enter Text:')
textbox1 = forms.TextBox()
checkbox1 = forms.CheckBox(Text = 'Start a new row')
grouplayout.AddRow(label1, textbox1)
grouplayout.AddRow(checkbox1)
self.m_groupbox.Content = grouplayout
def TestSampleEtoDialog():
dialog = SimpleEtoDialog()
dialog.ShowModal(Rhino.UI.RhinoEtoApp.MainWindow)
if __name__ == "__main__":
TestSampleEtoDialog()