Esempio n. 1
0
    def __init__(self, error="Unknown", title="Error", width=800, height=400):
        self.Title = title
        self.Padding = drawing.Padding(0)
        self.Resizable = False

        # tab_items = forms.StackLayoutItem(self.TabControl, True)
        layout = forms.StackLayout()
        layout.Spacing = 5
        layout.HorizontalContentAlignment = forms.HorizontalAlignment.Stretch

        self.m_textarea = forms.TextArea()
        self.m_textarea.Size = drawing.Size(400, 400)
        self.m_textarea.Text = error
        self.m_textarea.ReadOnly = True
        layout.Items.Add(self.m_textarea)

        sub_layout = forms.DynamicLayout()
        sub_layout.Spacing = drawing.Size(5, 0)
        sub_layout.AddRow(None, self.cancel)
        layout.Items.Add(forms.StackLayoutItem(sub_layout))

        self.Content = layout
        self.Padding = drawing.Padding(12)
        self.Resizable = True
        # self.ClientSize = drawing.Size(width, height)

        self.ShowModal(Rhino.UI.RhinoEtoApp.MainWindow)
Esempio n. 2
0
 def __init__(self):
     # create a control
     text = forms.TextArea()
     text.Text = "Every Good Boy Deserves Fudge."
     # create a layout
     layout = forms.TableLayout()
     layout.Padding = drawing.Padding(10)
     layout.Spacing = drawing.Size(5, 5)
     layout.Rows.Add(text)
     # set the panel content
     self.Content = layout
Esempio n. 3
0
    def __init__(self, text, title=None):
        self.text = text
        self.textbox = textbox = forms.TextArea()

        textbox.ReadOnly = True
        textbox.Append(text)

        layout = forms.DynamicLayout()
        layout.AddRow(textbox)
        layout.Add(None)
        layout.BeginVertical()
        layout.BeginHorizontal()
        layout.AddRow(None, self.ok, self.cancel)
        layout.EndHorizontal()
        layout.EndVertical()

        self.Title = title
        self.Padding = drawing.Padding(12)
        self.Resizable = False
        self.Content = layout
        self.ClientSize = drawing.Size(400, 600)