I want to create a picture box in ETO Rhino WIP.
It should be blank (just an outline of a box) and when the user selects a button he can load an image into it.
Is this possible? I’ve been looking through this page: https://github.com/picoe/Eto/wiki/Controls
And I can’t see anything that resembles a picture box.
Thanks a bunch.
dale
(Dale Fugier)
2
1 Like
Hi Dale,
I’m trying to implementing imageView in python, having trouble converting the syntax from C# to python
here is a snippet of the code:
from Eto.Forms import Form, ..., ImageView
def L(text):
return Label(Text = text, VerticalAlignment = VerticalAlignment.Center, TextAlignment = TextAlignment.Right)
form = Dialog[bool]()
form.Title = "Automated House Design"
form.Resizable = True
imageView = ImageView()
layout = DynamicLayout()
layout.AddRow(imageView)
form.Content = layout;
result = form.ShowModal(RhinoEtoApp.MainWindow)
Nothing is showing up when I run this
– Sam
dale
(Dale Fugier)
4
Hi Sam,
See if this is helpful:
import clr
clr.AddReference("Eto")
clr.AddReference("Rhino.UI")
from Rhino.UI import *
from Eto.Forms import *
from Eto.Drawing import *
dialog = Dialog()
dialog.Title = "Sample Eto Dialog"
dialog.Padding = Padding(5)
image_view = ImageView()
image_view.Image = Bitmap('C:\Users\Dale\Desktop\Test.png')
dialog.Content = image_view
dialog.ShowModal(RhinoEtoApp.MainWindow)
– Dale
1 Like