[IronPython] How to get access to enum?

Lepisto, Stephen P stephen.p.lepisto at intel.com
Mon May 4 08:12:36 PDT 2009


I believe you just need to import the enumeration:

from <module> import Visibility

where <module> is the module containing the definition of the enumeration.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Kristian Jaksch
Sent: Monday, May 04, 2009 7:25 AM
To: users at lists.ironpython.com
Subject: [IronPython] How to get access to enum?

How can I get access to enums in IronPython?

For example, when running IronPython + Silverlight I need access to
the Visibility enum:

btnMaxPlot.Visibility = Visibility.Collapsed

This results in an error:
"NameError: name 'Visibility' is not defined"

Thanks for help!

/Kristian
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


More information about the Users mailing list