Skip to content

Commit a2cb907

Browse files
committed
Favor Item instead of UItem
1 parent 58f5e7f commit a2cb907

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

stage3.0_first_views/traited_face_detect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
List,
1616
observe,
1717
)
18-
from traitsui.api import OKButton, UItem, View
18+
from traitsui.api import Item, OKButton, View
1919

2020

2121
class ImageFile(HasStrictTraits):
@@ -75,7 +75,7 @@ def _detect_faces(self):
7575
if __name__ == '__main__':
7676
img = ImageFile()
7777
view = View(
78-
UItem(name='filepath'),
78+
Item(name='filepath', show_label=False),
7979
buttons=[OKButton],
8080
resizable=True,
8181
width=640

stage3.1_first_views/traited_face_detect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
List,
1717
observe,
1818
)
19-
from traitsui.api import ModelView, OKButton, UItem, View
19+
from traitsui.api import Item, ModelView, OKButton, View
2020

2121
# Local imports
2222
from ets_tutorial.util.mpl_figure_editor import MplFigureEditor
@@ -83,8 +83,8 @@ class ImageFileView(ModelView):
8383
figure = Instance(Figure)
8484

8585
view = View(
86-
UItem("model.filepath"),
87-
UItem("figure", editor=MplFigureEditor()),
86+
Item("model.filepath", show_label=False),
87+
Item("figure", editor=MplFigureEditor(), show_label=False),
8888
buttons=[OKButton],
8989
resizable=True,
9090
title="Pycasa"

0 commit comments

Comments
 (0)