Layout Struggles

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

Layout Struggles

Jonathan Mackenzie
I'm trying to layout a Chaco app by setting traits_view
to an expression of nested View, Group,  and Item constructors
according to the Chaco/Traits user guides.

However, I'm really struggling to get things to behave in the
ways I'm expecting them to.

Most notably, forcing widths and sizes with negative pixel
values are often ignore. Groups partition space in ways that
does not seem to follow the expected logic - sometimes equally
spacing items, sometimes giving them just the right space
to fit. TextEditors are sized too big, and the whole layout alters
according to different styles.

All in all, despite the great power of the Enthought tools, I'm left
frustrated that I can't properly take control of the layout.

So my question... is this a common experience? Does the auto-layout
algorithm have a life of its own? Is there some way to overrule
the layout algorithm and position things reliable by hand by specifying
x,y,widths and heights etc?

Thanks in advance if you have a chance to answer this

Jonathan

--
Dr Jonathan Mackenzie
Research Associate
Martinez-Arias Lab
Dept. of Genetics
University of Cambridge
Cambridge, CB2 3EH, UK

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Layout Struggles

Pietro Berkes
Dear Jonathan,

I think it is fair to say that Traits UI views are a very easy way to create an interactive application with Chaco plots, but fine tuning the aspect of the final result can be frustrating at times.

If you want to have close control on the appearance of your window, you should have a look to the next-generation Traits UI, Enaml http://docs.enthought.com/enaml/ . With Enaml, controlling the aspect of your widgets is easier and more reliable, and setting a window up is as easy as with Traits UI.

All the best,
Pietro


On Thu, Oct 18, 2012 at 12:10 PM, Jonathan Mackenzie <[hidden email]> wrote:
I'm trying to layout a Chaco app by setting traits_view
to an expression of nested View, Group,  and Item constructors
according to the Chaco/Traits user guides.

However, I'm really struggling to get things to behave in the
ways I'm expecting them to.

Most notably, forcing widths and sizes with negative pixel
values are often ignore. Groups partition space in ways that
does not seem to follow the expected logic - sometimes equally
spacing items, sometimes giving them just the right space
to fit. TextEditors are sized too big, and the whole layout alters
according to different styles.

All in all, despite the great power of the Enthought tools, I'm left
frustrated that I can't properly take control of the layout.

So my question... is this a common experience? Does the auto-layout
algorithm have a life of its own? Is there some way to overrule
the layout algorithm and position things reliable by hand by specifying
x,y,widths and heights etc?

Thanks in advance if you have a chance to answer this

Jonathan

--
Dr Jonathan Mackenzie
Research Associate
Martinez-Arias Lab
Dept. of Genetics
University of Cambridge
Cambridge, CB2 3EH, UK

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



--
Pietro Berkes
Scientific software developer
Enthought UK



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Layout Struggles

Tiago Pereira
Dear Pietro et al.,

I've often seen Enaml suggested in this ML. However, given the very
infancy of the project (still in alpha?), one wonders if it's worth to
invest time to learn it. Presumably the API could change at very short
notice, no?

It looks like the feature-async branch has not been merged into the
master, is that still recommended for future-proofness?

Thanks,

Tiago


On 18/10/12 9:48 PM, Pietro Berkes wrote:

> Dear Jonathan,
>
> I think it is fair to say that Traits UI views are a very easy way to
> create an interactive application with Chaco plots, but fine tuning the
> aspect of the final result can be frustrating at times.
>
> If you want to have close control on the appearance of your window, you
> should have a look to the next-generation Traits UI, Enaml
> http://docs.enthought.com/enaml/ . With Enaml, controlling the aspect of
> your widgets is easier and more reliable, and setting a window up is as
> easy as with Traits UI.
>
> All the best,
> Pietro
>
>
> On Thu, Oct 18, 2012 at 12:10 PM, Jonathan Mackenzie <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I'm trying to layout a Chaco app by setting traits_view
>     to an expression of nested View, Group,  and Item constructors
>     according to the Chaco/Traits user guides.
>
>     However, I'm really struggling to get things to behave in the
>     ways I'm expecting them to.
>
>     Most notably, forcing widths and sizes with negative pixel
>     values are often ignore. Groups partition space in ways that
>     does not seem to follow the expected logic - sometimes equally
>     spacing items, sometimes giving them just the right space
>     to fit. TextEditors are sized too big, and the whole layout alters
>     according to different styles.
>
>     All in all, despite the great power of the Enthought tools, I'm left
>     frustrated that I can't properly take control of the layout.
>
>     So my question... is this a common experience? Does the auto-layout
>     algorithm have a life of its own? Is there some way to overrule
>     the layout algorithm and position things reliable by hand by specifying
>     x,y,widths and heights etc?
>
>     Thanks in advance if you have a chance to answer this
>
>     Jonathan
>
>     --
>     Dr Jonathan Mackenzie
>     Research Associate
>     Martinez-Arias Lab
>     Dept. of Genetics
>     University of Cambridge
>     Cambridge, CB2 3EH, UK
>
>     _______________________________________________
>     Enthought-Dev mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://mail.enthought.com/mailman/listinfo/enthought-dev
>
>
>
>
> --
> Pietro Berkes
> Scientific software developer
> Enthought UK
>
>
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Layout Struggles

Jonathan Mackenzie
In reply to this post by Pietro Berkes
Pietro Berkes <pberkes@...> writes:

>
>
> Dear Jonathan,I think it is fair to say that Traits UI views
are a very easy way to create an interactive
application with Chaco plots, but fine tuning the aspect of
the final result can be frustrating at times.If
you want to have close control on the appearance of your
window, you should have a look to the next-
generation Traits UI, Enaml http://docs.enthought.com/enaml/ .
With Enaml, controlling the aspect of
your widgets is easier and more reliable, and setting a window
up is as easy as with Traits UI.All the
best,Pietro
> On Thu, Oct 18, 2012 at 12:10 PM, Jonathan Mackenzie
<jpm67-
KWPb1pKIrIJaa/[hidden email]> wrote:I'm
trying to layout a Chaco app by setting
traits_view

> to an expression of nested View, Group,  and Item constructors
> according to the Chaco/Traits user guides.
> However, I'm really struggling to get things to behave in the
> ways I'm expecting them to.
> Most notably, forcing widths and sizes with negative pixel
> values are often ignore. Groups partition space in ways that
> does not seem to follow the expected logic - sometimes equally
> spacing items, sometimes giving them just the right space
> to fit. TextEditors are sized too big, and the whole layout alters
> according to different styles.
> All in all, despite the great power of the Enthought tools, I'm left
> frustrated that I can't properly take control of the layout.
> So my question... is this a common experience? Does the auto-layout
> algorithm have a life of its own? Is there some way to overrule
> the layout algorithm and position things reliable by hand by specifying
> x,y,widths and heights etc?
> Thanks in advance if you have a chance to answer this
> Jonathan
> --
> Dr Jonathan Mackenzie
> Research Associate
> Martinez-Arias Lab
> Dept. of Genetics
> University of Cambridge
> Cambridge, CB2 3EH, UK
> _______________________________________________
> Enthought-Dev mailing listEnthought-Dev-
[hidden email]
https://mail.enthought.com/mailman/listinfo/
enthought-dev

>
>
> -- Pietro BerkesScientific software developerEnthought UK
>
>
> _______________________________________________
> Enthought-Dev mailing list
> Enthought-Dev@...
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>


Pietro - thanks for your reply. Yes, I find Traits very
good for quick, simple views, but problematic when
getting more involved, or needing customisation.

Thanks for the tip about Enaml - I'll take a look.
For now, though, I have a Chaco program that's already
rather large and customised, and am reluctant
to rewrite. Is there any way to turn-off the autolayout,
 or to get at the underlying backend and layout with
this?  I know wx and find it pretty reliable.

JM


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Layout Struggles

Chris Colbert
In reply to this post by Tiago Pereira
Hey Tiago,

feature-async *is* the way forward and has reached a point where the api will not change drastically in backwards incompatible ways for a given version series. The feature-async branch has been adopted by a very large customer which I support on a day-to-day basis. The only reason that feature-async hasn't yet been merged with master, is that we have some other projects at Enthought which still need to migrate. When that happens, I will make the merge.

In other news, I just bumped the version number from 0.3.0 to 0.4.0alpha yesterday.


On Thu, Oct 18, 2012 at 7:37 AM, Tiago Pereira <[hidden email]> wrote:
Dear Pietro et al.,

I've often seen Enaml suggested in this ML. However, given the very
infancy of the project (still in alpha?), one wonders if it's worth to
invest time to learn it. Presumably the API could change at very short
notice, no?

It looks like the feature-async branch has not been merged into the
master, is that still recommended for future-proofness?

Thanks,

Tiago


On 18/10/12 9:48 PM, Pietro Berkes wrote:
> Dear Jonathan,
>
> I think it is fair to say that Traits UI views are a very easy way to
> create an interactive application with Chaco plots, but fine tuning the
> aspect of the final result can be frustrating at times.
>
> If you want to have close control on the appearance of your window, you
> should have a look to the next-generation Traits UI, Enaml
> http://docs.enthought.com/enaml/ . With Enaml, controlling the aspect of
> your widgets is easier and more reliable, and setting a window up is as
> easy as with Traits UI.
>
> All the best,
> Pietro
>
>
> On Thu, Oct 18, 2012 at 12:10 PM, Jonathan Mackenzie <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I'm trying to layout a Chaco app by setting traits_view
>     to an expression of nested View, Group,  and Item constructors
>     according to the Chaco/Traits user guides.
>
>     However, I'm really struggling to get things to behave in the
>     ways I'm expecting them to.
>
>     Most notably, forcing widths and sizes with negative pixel
>     values are often ignore. Groups partition space in ways that
>     does not seem to follow the expected logic - sometimes equally
>     spacing items, sometimes giving them just the right space
>     to fit. TextEditors are sized too big, and the whole layout alters
>     according to different styles.
>
>     All in all, despite the great power of the Enthought tools, I'm left
>     frustrated that I can't properly take control of the layout.
>
>     So my question... is this a common experience? Does the auto-layout
>     algorithm have a life of its own? Is there some way to overrule
>     the layout algorithm and position things reliable by hand by specifying
>     x,y,widths and heights etc?
>
>     Thanks in advance if you have a chance to answer this
>
>     Jonathan
>
>     --
>     Dr Jonathan Mackenzie
>     Research Associate
>     Martinez-Arias Lab
>     Dept. of Genetics
>     University of Cambridge
>     Cambridge, CB2 3EH, UK
>
>     _______________________________________________
>     Enthought-Dev mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://mail.enthought.com/mailman/listinfo/enthought-dev
>
>
>
>
> --
> Pietro Berkes
> Scientific software developer
> Enthought UK
>
>
>
>
> _______________________________________________
> 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


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Layout Struggles

Tiago Pereira
Great, thanks for the clarification.

Tiago

On 20/10/12 10:18 AM, Chris Colbert wrote:

> Hey Tiago,
>
> feature-async *is* the way forward and has reached a point where the api
> will not change drastically in backwards incompatible ways for a given
> version series. The feature-async branch has been adopted by a very
> large customer which I support on a day-to-day basis. The only reason
> that feature-async hasn't yet been merged with master, is that we have
> some other projects at Enthought which still need to migrate. When that
> happens, I will make the merge.
>
> In other news, I just bumped the version number from 0.3.0 to 0.4.0alpha
> yesterday.
>
>
> On Thu, Oct 18, 2012 at 7:37 AM, Tiago Pereira <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Dear Pietro et al.,
>
>     I've often seen Enaml suggested in this ML. However, given the very
>     infancy of the project (still in alpha?), one wonders if it's worth to
>     invest time to learn it. Presumably the API could change at very short
>     notice, no?
>
>     It looks like the feature-async branch has not been merged into the
>     master, is that still recommended for future-proofness?
>
>     Thanks,
>
>     Tiago
>
>
>     On 18/10/12 9:48 PM, Pietro Berkes wrote:
>     > Dear Jonathan,
>     >
>     > I think it is fair to say that Traits UI views are a very easy way to
>     > create an interactive application with Chaco plots, but fine
>     tuning the
>     > aspect of the final result can be frustrating at times.
>     >
>     > If you want to have close control on the appearance of your
>     window, you
>     > should have a look to the next-generation Traits UI, Enaml
>     > http://docs.enthought.com/enaml/ . With Enaml, controlling the
>     aspect of
>     > your widgets is easier and more reliable, and setting a window up
>     is as
>     > easy as with Traits UI.
>     >
>     > All the best,
>     > Pietro
>     >
>     >
>     > On Thu, Oct 18, 2012 at 12:10 PM, Jonathan Mackenzie
>     <[hidden email] <mailto:[hidden email]>
>     > <mailto:[hidden email] <mailto:[hidden email]>>> wrote:
>     >
>     >     I'm trying to layout a Chaco app by setting traits_view
>     >     to an expression of nested View, Group,  and Item constructors
>     >     according to the Chaco/Traits user guides.
>     >
>     >     However, I'm really struggling to get things to behave in the
>     >     ways I'm expecting them to.
>     >
>     >     Most notably, forcing widths and sizes with negative pixel
>     >     values are often ignore. Groups partition space in ways that
>     >     does not seem to follow the expected logic - sometimes equally
>     >     spacing items, sometimes giving them just the right space
>     >     to fit. TextEditors are sized too big, and the whole layout alters
>     >     according to different styles.
>     >
>     >     All in all, despite the great power of the Enthought tools,
>     I'm left
>     >     frustrated that I can't properly take control of the layout.
>     >
>     >     So my question... is this a common experience? Does the
>     auto-layout
>     >     algorithm have a life of its own? Is there some way to overrule
>     >     the layout algorithm and position things reliable by hand by
>     specifying
>     >     x,y,widths and heights etc?
>     >
>     >     Thanks in advance if you have a chance to answer this
>     >
>     >     Jonathan
>     >
>     >     --
>     >     Dr Jonathan Mackenzie
>     >     Research Associate
>     >     Martinez-Arias Lab
>     >     Dept. of Genetics
>     >     University of Cambridge
>     >     Cambridge, CB2 3EH, UK
>     >
>     >     _______________________________________________
>     >     Enthought-Dev mailing list
>     >     [hidden email]
>     <mailto:[hidden email]>
>     >     <mailto:[hidden email]
>     <mailto:[hidden email]>>
>     >     https://mail.enthought.com/mailman/listinfo/enthought-dev
>     >
>     >
>     >
>     >
>     > --
>     > Pietro Berkes
>     > Scientific software developer
>     > Enthought UK
>     >
>     >
>     >
>     >
>     > _______________________________________________
>     > Enthought-Dev mailing list
>     > [hidden email]
>     <mailto:[hidden email]>
>     > https://mail.enthought.com/mailman/listinfo/enthought-dev
>     >
>
>     _______________________________________________
>     Enthought-Dev mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://mail.enthought.com/mailman/listinfo/enthought-dev
>
>
>
>
> _______________________________________________
> 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