ListEditor style="fixed"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ListEditor style="fixed"

Raphael Walker
Hello All,

I try to use the ListEditor with Notebook and "fixed" style.

But this seems not to work!

The change of the style in the GUI with:
Right Click on Tab
   > "Edit Properties"
   > Select Style: "fixed"
   > OK
seems not to work too.
The Notebook style is alsways in "tab"-mode.

I'm using ETS_3.2 on linux.
I attached a small example at the end.

Regards,
Raphael


from enthought.traits.api import HasTraits, Str, List
from enthought.traits.ui.api import View, Group, Item, ListEditor

class Shop( HasTraits ):

     fruits = List

     view = View(
         Group(
             Group(
                 Item( 'fruits',
                       style  = 'custom',
                       editor = ListEditor( use_notebook = True,
                                            dock_style   = 'tab',
                                            page_name    = '.name' )
                 ),
             )
         ),
         title     = 'Shop',
         resizable = True
     )

class Fruit( HasTraits ):

     name = Str

     view = View('name')


demo = Shop( fruits = [ Fruit(name='apple'), Fruit(name='pear') ] )

if __name__ == '__main__':
     demo.configure_traits()
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: ListEditor style="fixed"

bryce hendrix-2
Just touching this to keep it alive, I haven't had the chance to try out
your example yet. Though, if anyone else has any insight, it would be
much appreciated...

On 2/17/2010 5:22 AM, Raphael Walker wrote:

> Hello All,
>
> I try to use the ListEditor with Notebook and "fixed" style.
>
> But this seems not to work!
>
> The change of the style in the GUI with:
> Right Click on Tab
>     >  "Edit Properties"
>     >  Select Style: "fixed"
>     >  OK
> seems not to work too.
> The Notebook style is alsways in "tab"-mode.
>
> I'm using ETS_3.2 on linux.
> I attached a small example at the end.
>
> Regards,
> Raphael
>
>
> from enthought.traits.api import HasTraits, Str, List
> from enthought.traits.ui.api import View, Group, Item, ListEditor
>
> class Shop( HasTraits ):
>
>       fruits = List
>
>       view = View(
>           Group(
>               Group(
>                   Item( 'fruits',
>                         style  = 'custom',
>                         editor = ListEditor( use_notebook = True,
>                                              dock_style   = 'tab',
>                                              page_name    = '.name' )
>                   ),
>               )
>           ),
>           title     = 'Shop',
>           resizable = True
>       )
>
> class Fruit( HasTraits ):
>
>       name = Str
>
>       view = View('name')
>
>
> demo = Shop( fruits = [ Fruit(name='apple'), Fruit(name='pear') ] )
>
> if __name__ == '__main__':
>       demo.configure_traits()
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>    

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev