Ugly grid appearence

Hello list.
In my application i'm using CustGridtable example from demo. In demo it works fine, but in my app there is something strange. I'm trying to add grid in existing frame: it adding successfully, but its appearence not fine - you can see it on attached image. If i maximaze the window, then
frame will looking as it must.
I believe, that it is some generic failure, that every newbie like me facing to, but i can't realise how to correctly handle it.

Thank in advance for your answer. It is my diploma project that i need to present tomorrow :slight_smile:

PS. i don't really think that it is OS-dependent, but i'm using FreeBSD 6.1, with python 2.4.3 and wxPython 2.6.3.2

grid.png

Hello Vyacheslav,

In my application i'm using CustGridtable example from demo. In demo it
works fine, but in my app there is something strange. I'm trying to add
grid in existing frame: it adding successfully, but its appearence not
fine - you can see it on attached image. If i maximaze the window, then
frame will looking as it must.

    are you putting your grid in a sizer before adding it to the
frame? If not, you may want to try something like:

sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(yourgrid, 1, wx.EXPAND)
sizer.Layout()
frame.SetSizer(sizer)
frame.Layout()

or something along these lines. If it doesn't work, you may try also
to put a wx.Panel inside the frame, then using the sizers as outlined
above you add the grid to the panel. These 2 solutions should work,
AFAIK.

HTH.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

Andrea Gavana ???:

Hello Vyacheslav,

In my application i'm using CustGridtable example from demo. In demo it
works fine, but in my app there is something strange. I'm trying to add
grid in existing frame: it adding successfully, but its appearence not
fine - you can see it on attached image. If i maximaze the window, then
frame will looking as it must.

   are you putting your grid in a sizer before adding it to the
frame? If not, you may want to try something like:

sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(yourgrid, 1, wx.EXPAND)
sizer.Layout()
frame.SetSizer(sizer)
frame.Layout()

or something along these lines. If it doesn't work, you may try also
to put a wx.Panel inside the frame, then using the sizers as outlined
above you add the grid to the panel. These 2 solutions should work,
AFAIK.

Thank you much Andrea!
I dont making Layout() calls before - this was a problem!
Thank you again!

ยทยทยท

HTH.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/