~ubuntu-branches/ubuntu/utopic/python-traitsui/utopic

« back to all changes in this revision

Viewing changes to examples/tutorials/doc_examples/examples/override_editor.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-07-09 13:57:39 UTC
  • Revision ID: james.westby@ubuntu.com-20110709135739-x5u20q86huissmn1
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#  Copyright (c) 2007, Enthought, Inc.
 
2
#  License: BSD Style.
 
3
 
 
4
# override_editor.py --- Example of overriding a trait
 
5
#                        editor
 
6
from traits.api import HasTraits, Trait
 
7
import traitsui
 
8
from traitsui.api import ColorEditor
 
9
from wxPython import wx
 
10
 
 
11
class Polygon(HasTraits):
 
12
    line_color = Trait(wx.wxColour(0, 0, 0),
 
13
                       editor=ColorEditor())