ETO picture box

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:

And I can’t see anything that resembles a picture box.

Thanks a bunch.

Hi Jack,

Use an Eto.Form.ImageView.

– Dale

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()


   form.Content = layout;

   result = form.ShowModal(RhinoEtoApp.MainWindow)

Nothing is showing up when I run this

– Sam

Hi Sam,

See if this is helpful:

import clr

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


– Dale

1 Like

Very helpful

Thanks Dale