from enthought.traits.ui.api import Item, Group, View, ImageEnumEditor, InstanceEditor
from enthought.mayavi.core import lut 
from enthought.mayavi.core.lut_manager import lut_mode_list
import os
lut_image_dir = os.path.dirname(lut.__file__)



# The view of the LUT Manager object.
view = View(Group(Item(name='lut_mode',
                       editor=ImageEnumEditor(values=lut_mode_list(), 
                                              cols=6,
                                              path=lut_image_dir)),
                  Item(name='file_name', visible_when="lut_mode=='file'"), 
                  Item(name='number_of_colors'),
                  Item(name='reverse_lut'),
                  
                  Group(Item(name='show_scalar_bar'),
                      Group(   
                          Item(name='number_of_labels'),
                          Item(name='shadow'),
                          Item(name='use_default_name'),
                          Item(name='data_name',
                               enabled_when='not object.use_default_name'),
                          Item(name='use_default_range'),
                          Item(name='data_range',
                               enabled_when='not object.use_default_range'),
                          Item(name='_title_text_property',
                               show_label=False,
                               editor=InstanceEditor(label='Edit bar Title')),
                          Item(name='_label_text_property',
                               show_label=False,
                               editor=InstanceEditor(label='Edit bar Text'),
                               label='Edit bar Text'),
                          enabled_when='show_scalar_bar==True',
                      ),    
                      show_border=True,
                  ),
                       
                  label='LUT (Look Up Table) Manager',
             ),

# Delete this once we're sure we want to keep the new integrated format.
#            Group(Item(name='_title_text_property',
#                       style='custom',
#                       resizable=True),
#                  show_labels=False,
#                  defined_when='show_scalar_bar==True',
#                  label='Title'),
#            Group(Item(name='_label_text_property',
#                       style='custom',
#                       resizable=True),
#                  enabled_when='show_scalar_bar==True',
#                  show_labels=False,
#                  label='Labels'),
            
            resizable=True,
        )

@@ -22,16 +22,22 @@
 .ui.api 
+%5C%0A    
 import I
@@ -85,16 +85,24 @@
 ceEditor
+, HGroup
 %0Afrom en
@@ -1286,32 +1286,97 @@
                 
+%0A                          HGroup(%0A                              
 Item(name='_titl
@@ -1416,32 +1416,36 @@
                 
+ 
+   
 show_label=False
@@ -1438,32 +1438,36 @@
 ow_label=False,%0A
+    
                 
@@ -1547,32 +1547,36 @@
                 
+  
+  
 Item(name='_labe
@@ -1616,32 +1616,36 @@
                 
+    
 show_label=False
@@ -1638,32 +1638,36 @@
 ow_label=False,%0A
+    
                 
@@ -1754,24 +1754,28 @@
             
+    
 label='Edit 
@@ -1778,32 +1778,93 @@
 dit bar Text'),%0A
+                          ),%0A                               %0A
                 

Make the buttons next to each other.