Subpanels in enthought traitsui do not resize

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

Subpanels in enthought traitsui do not resize

Per A Brodtkorb
I have implemented a GUI using traits UI with nested subpanels. My problem is that when I use the mouse to resize the window, the innermost subpanel does not resize and follow the size of the outer panels and main window:

Can anybody help with a workaround for this problem?

The source code is given at:

http://stackoverflow.com/questions/17467181/subpanels-in-enthought-traitsui-do-not-resize

The attached pictures show the initial layout of the gui and the result after resizing the window where the panel_7 does not resize correctly.

Best regards
Per A. Brodtkorb


Reply | Threaded
Open this post in threaded view
|

Re: Subpanels in enthought traitsui do not resize

Jaidev Deshpande
Hi,

On Fri, Jul 5, 2013 at 11:26 AM, Per A Brodtkorb
<[hidden email]> wrote:

> I have implemented a GUI using traits UI with nested subpanels. My problem is
> that when I use the mouse to resize the window, the innermost subpanel does
> not resize and follow the size of the outer panels and main window:
>
> Can anybody help with a workaround for this problem?
>
> The source code is given at:
>
> http://stackoverflow.com/questions/17467181/subpanels-in-enthought-traitsui-do-not-resize
> <http://stackoverflow.com/questions/17467181/subpanels-in-enthought-traitsui-do-not-resize>
>
> The attached pictures show the initial layout of the gui and the result
> after resizing the window where the panel_7 does not resize correctly.

When you say panel_7 doesn't resize correctly, do you mean it doesn't
expand horizontally to occupy the remaining space?

>
> Best regards
> Per A. Brodtkorb
>
> <http://enthought-dev.117412.n3.nabble.com/file/n4026546/2013-07-04_initial_layout.png>
> <http://enthought-dev.117412.n3.nabble.com/file/n4026546/2013-07-04_resized_layout.png>
>
>
>
> --
> View this message in context: http://enthought-dev.117412.n3.nabble.com/Subpanels-in-enthought-traitsui-do-not-resize-tp4026546.html
> Sent from the Enthought Dev mailing list archive at Nabble.com.
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev



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

Re: Subpanels in enthought traitsui do not resize

Per A Brodtkorb
Yes, I mean panel_7 doesn't expand horizontally or vertically to occupy the remaining space.
Reply | Threaded
Open this post in threaded view
|

Re: Subpanels in enthought traitsui do not resize

Jaidev Deshpande
On Fri, Jul 5, 2013 at 12:08 PM, Per A Brodtkorb
<[hidden email]> wrote:
> Yes, I mean panel_7 doesn't expand horizontally or vertically to occupy the
> remaining space.
>

It's working fine in my case. Which traits backend are you using?

>
>
> --
> View this message in context: http://enthought-dev.117412.n3.nabble.com/Subpanels-in-enthought-traitsui-do-not-resize-tp4026546p4026548.html
> Sent from the Enthought Dev mailing list archive at Nabble.com.
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev



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

Re: Subpanels in enthought traitsui do not resize

Per A Brodtkorb
Hi, again.


I am not sure. How do I figure out which backend I am using?


On 5 July 2013 08:57, Jaidev Deshpande [via Enthought Dev] <[hidden email]> wrote:
On Fri, Jul 5, 2013 at 12:08 PM, Per A Brodtkorb
<[hidden email]> wrote:
> Yes, I mean panel_7 doesn't expand horizontally or vertically to occupy the
> remaining space.
>

It's working fine in my case. Which traits backend are you using?

>
>
> --
> View this message in context: http://enthought-dev.117412.n3.nabble.com/Subpanels-in-enthought-traitsui-do-not-resize-tp4026546p4026548.html

> Sent from the Enthought Dev mailing list archive at Nabble.com.
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev



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



If you reply to this email, your message will be added to the discussion below:
http://enthought-dev.117412.n3.nabble.com/Subpanels-in-enthought-traitsui-do-not-resize-tp4026546p4026549.html
To unsubscribe from Subpanels in enthought traitsui do not resize, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Subpanels in enthought traitsui do not resize

Jaidev Deshpande
On Fri, Jul 5, 2013 at 1:22 PM, Per A Brodtkorb
<[hidden email]> wrote:
> Hi, again.
>
>
> I am not sure. How do I figure out which backend I am using?
>

Try this in Python

from traits.etsconfig.api import ETSConfig
print ETSConfig.toolkit

The output should be either "qt4" or "wx". Please share which.

>
> On 5 July 2013 08:57, Jaidev Deshpande [via Enthought Dev] <
> [hidden email]> wrote:
>
>> On Fri, Jul 5, 2013 at 12:08 PM, Per A Brodtkorb
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=4026549&i=0>>
>> wrote:
>> > Yes, I mean panel_7 doesn't expand horizontally or vertically to occupy
>> the
>> > remaining space.
>> >
>>
>> It's working fine in my case. Which traits backend are you using?
>>
>> >
>> >
>> > --
>> > View this message in context:
>> http://enthought-dev.117412.n3.nabble.com/Subpanels-in-enthought-traitsui-do-not-resize-tp4026546p4026548.html
>>
>> > Sent from the Enthought Dev mailing list archive at Nabble.com.
>> > _______________________________________________
>> > Enthought-Dev mailing list
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4026549&i=1>
>> > https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
>>
>>
>> --
>> JD
>> _______________________________________________
>> Enthought-Dev mailing list
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=4026549&i=2>
>> https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://enthought-dev.117412.n3.nabble.com/Subpanels-in-enthought-traitsui-do-not-resize-tp4026546p4026549.html
>>  To unsubscribe from Subpanels in enthought traitsui do not resize, click
>> here<
>> .
>> NAML<
http://enthought-dev.117412.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: http://enthought-dev.117412.n3.nabble.com/Subpanels-in-enthought-traitsui-do-not-resize-tp4026546p4026550.html
> Sent from the Enthought Dev mailing list archive at Nabble.com.
> _______________________________________________
> Enthought-Dev mailing list
> [hidden email]
> https://mail.enthought.com/mailman/listinfo/enthought-dev



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

Re: Subpanels in enthought traitsui do not resize

Per A Brodtkorb
I am using the wx backend.


On 5 July 2013 17:23, Jaidev Deshpande [via Enthought Dev] <[hidden email]> wrote:
On Fri, Jul 5, 2013 at 1:22 PM, Per A Brodtkorb
<[hidden email]> wrote:
> Hi, again.
>
>
> I am not sure. How do I figure out which backend I am using?
>

Try this in Python

from traits.etsconfig.api import ETSConfig
print ETSConfig.toolkit

The output should be either "qt4" or "wx". Please share which.

>
> On 5 July 2013 08:57, Jaidev Deshpande [via Enthought Dev] <
> [hidden email]> wrote:
>
>> On Fri, Jul 5, 2013 at 12:08 PM, Per A Brodtkorb
>> <[hidden email] <http://user/SendEmail.jtp?type=node&node=4026549&i=0>>
>> wrote:

>> > Yes, I mean panel_7 doesn't expand horizontally or vertically to occupy
>> the
>> > remaining space.
>> >
>>
>> It's working fine in my case. Which traits backend are you using?
>>
>> >
>> >
>> > --
>> > View this message in context:
>> http://enthought-dev.117412.n3.nabble.com/Subpanels-in-enthought-traitsui-do-not-resize-tp4026546p4026548.html
>>
>> > Sent from the Enthought Dev mailing list archive at Nabble.com.
>> > _______________________________________________
>> > Enthought-Dev mailing list
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4026549&i=1>
>> > https://mail.enthought.com/mailman/listinfo/enthought-dev
>>
>>
>>
>> --
>> JD
>> _______________________________________________
>> Enthought-Dev mailing list


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



If you reply to this email, your message will be added to the discussion below:
http://enthought-dev.117412.n3.nabble.com/Subpanels-in-enthought-traitsui-do-not-resize-tp4026546p4026551.html
To unsubscribe from Subpanels in enthought traitsui do not resize, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Subpanels in enthought traitsui do not resize

Jaidev Deshpande
On Tue, Jul 9, 2013 at 12:28 PM, Per A Brodtkorb
<[hidden email]> wrote:
> I am using the wx backend.
>

Hi, I was able to replicate the error when I changed the backend to
wx. Changing your backend to qt should make the panels expand
properly. This is just a workaround and not a solution, though. There
must be a way to make this work with wx, although I don't know how.

Change your backed to qt by doing this at the cmd prompt:
 > export ETS_TOOLKIT=qt4
And run the script again.

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

Re: Subpanels in enthought traitsui do not resize

Per A Brodtkorb
Ok, thanks! However, I think I need to use the wx backend because I embed the traitsui in a wx gui.
Per A



On 9 July 2013 09:01, Jaidev Deshpande <[hidden email]> wrote:
On Tue, Jul 9, 2013 at 12:28 PM, Per A Brodtkorb
<[hidden email]> wrote:
> I am using the wx backend.
>

Hi, I was able to replicate the error when I changed the backend to
wx. Changing your backend to qt should make the panels expand
properly. This is just a workaround and not a solution, though. There
must be a way to make this work with wx, although I don't know how.

Change your backed to qt by doing this at the cmd prompt:
 > export ETS_TOOLKIT=qt4
And run the script again.

HTH
_______________________________________________
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