[IronPython] Using ipy to "control" a form

Greg Akins angrygreg at gmail.com
Thu Apr 10 13:37:48 CEST 2008


On Thu, Apr 10, 2008 at 7:21 AM, Greg Akins <angrygreg at gmail.com> wrote:
> On Wed, Apr 9, 2008 at 10:15 PM, Curt Hagenlocher <curt at hagenlocher.org> wrote:
>  > On Wed, Apr 9, 2008 at 7:04 PM, Sanghyeon Seo <sanxiyn at gmail.com> wrote:

>  >  > If what you are trying to do is to play with WinForms from the
>  >  > interactive console, then you may want to study Tutorial/winforms.py
>  >  > carefully. (Or just use it.)
>  >
>  >  I think winforms.py isn't working in IronPython 2.0 beta 1, but this
>  >  is a good idea for 1.x.

The tutorial didn't "work" correctly, but winforms.py seemed to work
OK.  Though I just did a simple form.Show() after executing, it so I'm
not sure that it is working completely.

The portion of the Tutorial that didn't work for me is listed below.
However, I when I executed 'from System.Windows.Forms import Form'
(instead of *) then form.Show() worked OK.


>>> from System.Windows.Forms import *
>>> form = Form()
>>> from System.Windows.Forms import *
>>> from System.Drawing import *
>>> f = Form()
Traceback (most recent call last):
  File , line 0, in ##117
NameError: name 'Form' is not defined



-- 
Greg Akins
Software Development Manager
SSI Services

http://kc.vanadium.com
http://www.pghcodingdojo.org
http://www.insomnia-consulting.org/monologue



More information about the Ironpython-users mailing list