Problem with layout : Grid in MS Windows

1 view
Skip to first unread message

Olemis Lang

unread,
Nov 13, 2009, 8:37:25 AM11/13/09
to wxpytho...@googlegroups.com
I am using version 2.8.10 of wxPython . I have a GUI arranged as follows :

button button static text
grid

They are placed inside a panel being the only child of the frame .

In Windows, I have tried the following layouts (indentation suggest
parent/child relationship) :

1. box sizers

vertical box (2 rows)
horizontal box (3 cols)
button
button
static text
grid

2. gridbag sizer

gb sizer
button (0,0)
button (0,1)
static text (0,2)
grid (1,0) colspan=3

2. grid sizer

g sizer
g sizer
button
button
static text
grid

In all cases (in Windows) the grid is always overlapping the buttons
and static text. I thought it was a programming error but I just tried
it in Ubuntu Hardy (GTK isn't it ? ) and it works as expected .

Is this a bug, a known issue or expected behavior ? How could I (Is
there a workaround ;o) to make things work as they should ?

Thanx in advance !

--
Regards,

Olemis.

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

Mike Driscoll

unread,
Nov 13, 2009, 10:42:26 AM11/13/09
to wxPython-users
Hi,
On Windows, if you resize the window slightly, do the widgets "snap"
into place? If so, you probably need to call Layout() somewhere in
your program.

If you have a small runnable sample that shows the problem, that would
be good too.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

Olemis Lang

unread,
Nov 13, 2009, 1:56:23 PM11/13/09
to wxpytho...@googlegroups.com
On Fri, Nov 13, 2009 at 10:42 AM, Mike Driscoll <kyos...@gmail.com> wrote:
>
> Hi,
>

:)

> On Nov 13, 7:37 am, Olemis Lang <ole...@gmail.com> wrote:
>> I am using version 2.8.10 of wxPython . I have a GUI arranged as follows :
>>
>> button      button      static text
>> grid
>>
>> They are placed inside a panel being the only child of the frame .
>>
>> In Windows, I have tried the following layouts (indentation suggest
>> parent/child relationship) :
>>
>>   1. box sizers
>>

[...]
>>
>>   2. gridbag sizer
>>
[...]
>>
>>   2. grid sizer
>>
[...]
>>
>
[...]


>
> On Windows, if you resize the window slightly, do the widgets "snap"
> into place?

Nope they remain just like they were before

:-/

> If so, you probably need to call Layout() somewhere in
> your program.
>

... but this is the cause . I checked once again and I found the
problem. Everything was inside a panel and I was calling the frame's
Layout method instead of the panel's .

Thnx !

Reply all
Reply to author
Forward
0 new messages