1
# Copyright (c) 2007, Enthought, Inc.
5
# configure_traits_view_group.py -- Sample code to demonstrate configure_traits()
7
#--[Imports]--------------------------------------------------------------------
8
from traits.api import HasTraits, Str, Int
9
from traitsui.api import View, Item, Group
12
#--[Code]-----------------------------------------------------------------------
14
class SimpleEmployee(HasTraits):
22
view1 = View(Group(Item(name = 'first_name'),
23
Item(name = 'last_name'),
24
Item(name = 'department'),
25
label = 'Personnel profile',
29
sam = SimpleEmployee()
30
sam.configure_traits(view=view1)