1
# Copyright (c) 2007, Enthought, Inc.
5
# configure_traits_view_buttons.py -- Sample code to demonstrate
8
#--[Imports]--------------------------------------------------------------------
9
from traits.api import HasTraits, Str, Int
10
from traitsui.api import View, Item
11
from traitsui.menu import OKButton, CancelButton
13
#--[Code]-----------------------------------------------------------------------
15
class SimpleEmployee(HasTraits):
23
view1 = View(Item(name = 'first_name'),
24
Item(name = 'last_name'),
25
Item(name = 'department'),
26
buttons = [OKButton, CancelButton])
28
sam = SimpleEmployee()
29
sam.configure_traits(view=view1)