align gid to bottom

i'm trying to align a wx.grid to the bottom of a sizer, and i appear to be unable to do so. heres my code
self.ChangeTinOut is the grid

        ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
        ChangeTinOutGridSizer.Add(self.ChangeTinOut,2,wx.EXPAND|wx.BOTTOM)
        ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)
        ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

Timothy Smith wrote:

i'm trying to align a wx.grid to the bottom of a sizer, and i appear to be unable to do so. heres my code
self.ChangeTinOut is the grid

       ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOut,2,wx.EXPAND|wx.BOTTOM)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL) ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

That's going to put ChangeTinOut at the TOP of the sizer, letting it expand twice as much as the other two entries. wx.BOTTOM is a flag indicating that you want a border on the bottom.

and wx.ALIGN_CENTER_VERTICAL) doesn't do anything with stretchy items in a vertical sizer.

I'm not entirely sure what you want, but if you set he second parameter to larger than 0, then it will stretch to fit he space, so there really isn't a Bottom to align it with. If you want an item to sit at the bottom of the sizer, with space above it, you need to put a spacer it and let that space stretch:

ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add((1,1), 1) # this adds a 1X1 spacer that will stretch
ChangeTinOutGridSizer.Add(self.ChangeTinOut,0,wx.EXPAND|wx.BOTTOM)

Have read all the docs in the Wiki about Sizers? They should help.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Chris Barker wrote:

Timothy Smith wrote:

i'm trying to align a wx.grid to the bottom of a sizer, and i appear to be unable to do so. heres my code
self.ChangeTinOut is the grid

       ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOut,2,wx.EXPAND|wx.BOTTOM)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

That's going to put ChangeTinOut at the TOP of the sizer, letting it expand twice as much as the other two entries. wx.BOTTOM is a flag indicating that you want a border on the bottom.

and wx.ALIGN_CENTER_VERTICAL) doesn't do anything with stretchy items in a vertical sizer.

I'm not entirely sure what you want, but if you set he second parameter to larger than 0, then it will stretch to fit he space, so there really isn't a Bottom to align it with. If you want an item to sit at the bottom of the sizer, with space above it, you need to put a spacer it and let that space stretch:

ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add((1,1), 1) # this adds a 1X1 spacer that will stretch
ChangeTinOutGridSizer.Add(self.ChangeTinOut,0,wx.EXPAND|wx.BOTTOM)

Have read all the docs in the Wiki about Sizers? They should help.

-Chris

ok i tried your idea of putting in the spacein on top of the ChangeTinOut grid object andi was able to make it kind of work, however it's still not really a very good solution.
this is what i want to do

                     _______________ > GRID2 |
_________ | |
> GRID1 | | |
>________| |______________|
________________________________

see how i want to align grid1 with the botton of grid 2? it doesn't seem to be possible because grids dont' report their size, so in order to see the whole grid you have to use EXPAND, which makes ALIGN_BOTTOM impossible.

Hi Timothy,

What I think you need to do is use an extra sizer or set of sizers.

···

+--------------------------------------------------------+

wx.BoxSizer(wx.VERTICAL) |
                                                       >
+--------------------------------------------------+ |
> wx.FlexGridSizer for whatever widgets | |
+--------------------------------------------------+ |
                                                       >
+--------------------------------------------------+ |
>((-1,-1),1, wx.EXPAND) # Spacer | |
+--------------------------------------------------+ |
                                                       >
+---------------------------------------------------+ |
> wx.BoxSizer(wx.HORIZONTAL) +----------------+ | |
> +------------+ +-------------+ |(grid2, 0, | | |
> >(grid1, 0, | |((-1, -1),1, | | wx.ALIGN_BOTTOM| | |
> > wx.ALIGN_- | | wx.EXPAND) | | ) | | |
> > BOTTOM) | | #Spacer | | | | |
> +------------+ +-------------+ +----------------+ | |
+---------------------------------------------------+ |

+--------------------------------------------------------+

viola problem solved!

-Joe
PS.
Sizers are hard to wrap your head around. What I've been doing to keep them easier to manage is creating all the widgets at the top of the code segment. Then grouping the sizer stuff at the end of the _init_ or wherever.

fgsizer = wx.FlexGridSizer(2,2,3,3)
fgsizer.AddMany([
     Widget,
     ])

hbsizer = wx.BoxSizer(wx.HORIZONTAL)
hbsizer.AddMany([
     (grid1, 0, wx.ALIGN_BOTTOM),
     ((-1, -1), 1, wx.EXPAND),
     (grid2, 0, wx.ALIGN_BOTTOM),
     ])

vbsizer = wx.BoxSizer(wx.VERTICAL)
vbsizer.AddMany([
     (fgsizer, 0, wx.EXPAND),
     ((-1,-1), 1, wx.EXPAND),
     (hbsizer, 0, wx.EXPAND),
     ])

self.SetSizer(vbsizer)
...

Timothy Smith wrote:

Chris Barker wrote:

Timothy Smith wrote:

i'm trying to align a wx.grid to the bottom of a sizer, and i appear to be unable to do so. heres my code
self.ChangeTinOut is the grid

       ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOut,2,wx.EXPAND|wx.BOTTOM)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

That's going to put ChangeTinOut at the TOP of the sizer, letting it expand twice as much as the other two entries. wx.BOTTOM is a flag indicating that you want a border on the bottom.

and wx.ALIGN_CENTER_VERTICAL) doesn't do anything with stretchy items in a vertical sizer.

I'm not entirely sure what you want, but if you set he second parameter to larger than 0, then it will stretch to fit he space, so there really isn't a Bottom to align it with. If you want an item to sit at the bottom of the sizer, with space above it, you need to put a spacer it and let that space stretch:

ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add((1,1), 1) # this adds a 1X1 spacer that will stretch
ChangeTinOutGridSizer.Add(self.ChangeTinOut,0,wx.EXPAND|wx.BOTTOM)

Have read all the docs in the Wiki about Sizers? They should help.

-Chris

ok i tried your idea of putting in the spacein on top of the ChangeTinOut grid object andi was able to make it kind of work, however it's still not really a very good solution.
this is what i want to do

>
> _______________ | | GRID2 |
> _________ | |
> > GRID1 | | |
> >________| |______________|
>________________________________

see how i want to align grid1 with the botton of grid 2? it doesn't seem to be possible because grids dont' report their size, so in order to see the whole grid you have to use EXPAND, which makes ALIGN_BOTTOM impossible.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

the problem is, that simply doesn't work. grids don't report their size properly, so unless you use wx.EXPAND with them you end up with a dot on the screen. usign your example, grid1 would not show it's full horiztonal size.

Joe Brown wrote:

···

Hi Timothy,

What I think you need to do is use an extra sizer or set of sizers.

+--------------------------------------------------------+
>wx.BoxSizer(wx.VERTICAL) |
> >
> +--------------------------------------------------+ |
> > wx.FlexGridSizer for whatever widgets | |
> +--------------------------------------------------+ |
> >
> +--------------------------------------------------+ |
> >((-1,-1),1, wx.EXPAND) # Spacer | |
> +--------------------------------------------------+ |
> >
> +---------------------------------------------------+ |
> > wx.BoxSizer(wx.HORIZONTAL) +----------------+ | |
> > +------------+ +-------------+ |(grid2, 0, | | |
> > >(grid1, 0, | |((-1, -1),1, | | wx.ALIGN_BOTTOM| | |
> > > wx.ALIGN_- | | wx.EXPAND) | | ) | | |
> > > BOTTOM) | | #Spacer | | | | |
> > +------------+ +-------------+ +----------------+ | |
> +---------------------------------------------------+ |
+--------------------------------------------------------+

viola problem solved!

-Joe
PS.
Sizers are hard to wrap your head around. What I've been doing to keep them easier to manage is creating all the widgets at the top of the code segment. Then grouping the sizer stuff at the end of the _init_ or wherever.

fgsizer = wx.FlexGridSizer(2,2,3,3)
fgsizer.AddMany([
    Widget,
    ])

hbsizer = wx.BoxSizer(wx.HORIZONTAL)
hbsizer.AddMany([
    (grid1, 0, wx.ALIGN_BOTTOM),
    ((-1, -1), 1, wx.EXPAND),
    (grid2, 0, wx.ALIGN_BOTTOM),
    ])

vbsizer = wx.BoxSizer(wx.VERTICAL)
vbsizer.AddMany([
    (fgsizer, 0, wx.EXPAND),
    ((-1,-1), 1, wx.EXPAND),
    (hbsizer, 0, wx.EXPAND),
    ])

self.SetSizer(vbsizer)
...

Timothy Smith wrote:

Chris Barker wrote:

Timothy Smith wrote:

i'm trying to align a wx.grid to the bottom of a sizer, and i appear to be unable to do so. heres my code
self.ChangeTinOut is the grid

       ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOut,2,wx.EXPAND|wx.BOTTOM)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

That's going to put ChangeTinOut at the TOP of the sizer, letting it expand twice as much as the other two entries. wx.BOTTOM is a flag indicating that you want a border on the bottom.

and wx.ALIGN_CENTER_VERTICAL) doesn't do anything with stretchy items in a vertical sizer.

I'm not entirely sure what you want, but if you set he second parameter to larger than 0, then it will stretch to fit he space, so there really isn't a Bottom to align it with. If you want an item to sit at the bottom of the sizer, with space above it, you need to put a spacer it and let that space stretch:

ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add((1,1), 1) # this adds a 1X1 spacer that will stretch
ChangeTinOutGridSizer.Add(self.ChangeTinOut,0,wx.EXPAND|wx.BOTTOM)

Have read all the docs in the Wiki about Sizers? They should help.

-Chris

ok i tried your idea of putting in the spacein on top of the ChangeTinOut grid object andi was able to make it kind of work, however it's still not really a very good solution.
this is what i want to do

>
> _______________ | | GRID2 |
> _________ | |
> > GRID1 | | |
> >________| |______________|
>________________________________

see how i want to align grid1 with the botton of grid 2? it doesn't seem to be possible because grids dont' report their size, so in order to see the whole grid you have to use EXPAND, which makes ALIGN_BOTTOM impossible.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Timothy Smith wrote:

the problem is, that simply doesn't work. grids don't report their size properly, so unless you use wx.EXPAND with them you end up with a dot on the screen. usign your example, grid1 would not show it's full horiztonal size.

Well, yes. Grids (and other similar Windows) are tough because they include scroll bars if required, and thus don't really have a BestSize. The solution is generally to either let them expand to fill available space or give them an explicit size.

However, I'm still not sure I understand your problem. I think you might have used a proportional font for your ascii art, because is was just a big mess in my email. If you're trying to do what Joe's drawn, then why are you using a vertical BoxSizer?

I'm going to try suggesting this again:

Make a small sample that almost does what you want, and maybe we can fix it for you.

-Chris

···

Joe Brown wrote:

Hi Timothy,

What I think you need to do is use an extra sizer or set of sizers.

+--------------------------------------------------------+
>wx.BoxSizer(wx.VERTICAL) |
> >
> +--------------------------------------------------+ |
> > wx.FlexGridSizer for whatever widgets | |
> +--------------------------------------------------+ |
> >
> +--------------------------------------------------+ |
> >((-1,-1),1, wx.EXPAND) # Spacer | |
> +--------------------------------------------------+ |
> >
> +---------------------------------------------------+ |
> > wx.BoxSizer(wx.HORIZONTAL) +----------------+ | |
> > +------------+ +-------------+ |(grid2, 0, | | |
> > >(grid1, 0, | |((-1, -1),1, | | wx.ALIGN_BOTTOM| | |
> > > wx.ALIGN_- | | wx.EXPAND) | | ) | | |
> > > BOTTOM) | | #Spacer | | | | |
> > +------------+ +-------------+ +----------------+ | |
> +---------------------------------------------------+ |
+--------------------------------------------------------+

viola problem solved!

-Joe
PS.
Sizers are hard to wrap your head around. What I've been doing to keep them easier to manage is creating all the widgets at the top of the code segment. Then grouping the sizer stuff at the end of the _init_ or wherever.

fgsizer = wx.FlexGridSizer(2,2,3,3)
fgsizer.AddMany([
    Widget,
    ])

hbsizer = wx.BoxSizer(wx.HORIZONTAL)
hbsizer.AddMany([
    (grid1, 0, wx.ALIGN_BOTTOM),
    ((-1, -1), 1, wx.EXPAND),
    (grid2, 0, wx.ALIGN_BOTTOM),
    ])

vbsizer = wx.BoxSizer(wx.VERTICAL)
vbsizer.AddMany([
    (fgsizer, 0, wx.EXPAND),
    ((-1,-1), 1, wx.EXPAND),
    (hbsizer, 0, wx.EXPAND),
    ])

self.SetSizer(vbsizer)
...

Timothy Smith wrote:

Chris Barker wrote:

Timothy Smith wrote:

i'm trying to align a wx.grid to the bottom of a sizer, and i appear to be unable to do so. heres my code
self.ChangeTinOut is the grid

       ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOut,2,wx.EXPAND|wx.BOTTOM)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

That's going to put ChangeTinOut at the TOP of the sizer, letting it expand twice as much as the other two entries. wx.BOTTOM is a flag indicating that you want a border on the bottom.

and wx.ALIGN_CENTER_VERTICAL) doesn't do anything with stretchy items in a vertical sizer.

I'm not entirely sure what you want, but if you set he second parameter to larger than 0, then it will stretch to fit he space, so there really isn't a Bottom to align it with. If you want an item to sit at the bottom of the sizer, with space above it, you need to put a spacer it and let that space stretch:

ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add((1,1), 1) # this adds a 1X1 spacer that will stretch
ChangeTinOutGridSizer.Add(self.ChangeTinOut,0,wx.EXPAND|wx.BOTTOM)

Have read all the docs in the Wiki about Sizers? They should help.

-Chris

ok i tried your idea of putting in the spacein on top of the ChangeTinOut grid object andi was able to make it kind of work, however it's still not really a very good solution.
this is what i want to do

>
> _______________ | | GRID2 |
> _________ | |
> > GRID1 | | |
> >________| |______________|
>________________________________

see how i want to align grid1 with the botton of grid 2? it doesn't seem to be possible because grids dont' report their size, so in order to see the whole grid you have to use EXPAND, which makes ALIGN_BOTTOM impossible.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

--
Christopher Barker, Ph.D.
Oceanographer
                                          
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

run that attached file and you will see right away what is wrong.

Chris Barker wrote:

demo.py (18.4 KB)

···

Timothy Smith wrote:

the problem is, that simply doesn't work. grids don't report their size properly, so unless you use wx.EXPAND with them you end up with a dot on the screen. usign your example, grid1 would not show it's full horiztonal size.

Well, yes. Grids (and other similar Windows) are tough because they include scroll bars if required, and thus don't really have a BestSize. The solution is generally to either let them expand to fill available space or give them an explicit size.

However, I'm still not sure I understand your problem. I think you might have used a proportional font for your ascii art, because is was just a big mess in my email. If you're trying to do what Joe's drawn, then why are you using a vertical BoxSizer?

I'm going to try suggesting this again:

Make a small sample that almost does what you want, and maybe we can fix it for you.

-Chris

Joe Brown wrote:

Hi Timothy,

What I think you need to do is use an extra sizer or set of sizers.

+--------------------------------------------------------+
>wx.BoxSizer(wx.VERTICAL) |
> >
> +--------------------------------------------------+ |
> > wx.FlexGridSizer for whatever widgets | |
> +--------------------------------------------------+ |
> >
> +--------------------------------------------------+ |
> >((-1,-1),1, wx.EXPAND) # Spacer | |
> +--------------------------------------------------+ |
> >
> +---------------------------------------------------+ |
> > wx.BoxSizer(wx.HORIZONTAL) +----------------+ | |
> > +------------+ +-------------+ |(grid2, 0, | | |
> > >(grid1, 0, | |((-1, -1),1, | | wx.ALIGN_BOTTOM| | |
> > > wx.ALIGN_- | | wx.EXPAND) | | ) | | |
> > > BOTTOM) | | #Spacer | | | | |
> > +------------+ +-------------+ +----------------+ | |
> +---------------------------------------------------+ |
+--------------------------------------------------------+

viola problem solved!

-Joe
PS.
Sizers are hard to wrap your head around. What I've been doing to keep them easier to manage is creating all the widgets at the top of the code segment. Then grouping the sizer stuff at the end of the _init_ or wherever.

fgsizer = wx.FlexGridSizer(2,2,3,3)
fgsizer.AddMany([
    Widget,
    ])

hbsizer = wx.BoxSizer(wx.HORIZONTAL)
hbsizer.AddMany([
    (grid1, 0, wx.ALIGN_BOTTOM),
    ((-1, -1), 1, wx.EXPAND),
    (grid2, 0, wx.ALIGN_BOTTOM),
    ])

vbsizer = wx.BoxSizer(wx.VERTICAL)
vbsizer.AddMany([
    (fgsizer, 0, wx.EXPAND),
    ((-1,-1), 1, wx.EXPAND),
    (hbsizer, 0, wx.EXPAND),
    ])

self.SetSizer(vbsizer)
...

Timothy Smith wrote:

Chris Barker wrote:

Timothy Smith wrote:

i'm trying to align a wx.grid to the bottom of a sizer, and i appear to be unable to do so. heres my code
self.ChangeTinOut is the grid

       ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOut,2,wx.EXPAND|wx.BOTTOM)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)
       ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

That's going to put ChangeTinOut at the TOP of the sizer, letting it expand twice as much as the other two entries. wx.BOTTOM is a flag indicating that you want a border on the bottom.

and wx.ALIGN_CENTER_VERTICAL) doesn't do anything with stretchy items in a vertical sizer.

I'm not entirely sure what you want, but if you set he second parameter to larger than 0, then it will stretch to fit he space, so there really isn't a Bottom to align it with. If you want an item to sit at the bottom of the sizer, with space above it, you need to put a spacer it and let that space stretch:

ChangeTinOutGridSizer = wx.BoxSizer(wx.VERTICAL)
ChangeTinOutGridSizer.Add(self.ChangeTinOutTotal,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add(self.ChangeTinOutCurrently,1,wx.ALIGN_CENTER_VERTICAL)

ChangeTinOutGridSizer.Add((1,1), 1) # this adds a 1X1 spacer that will stretch
ChangeTinOutGridSizer.Add(self.ChangeTinOut,0,wx.EXPAND|wx.BOTTOM)

Have read all the docs in the Wiki about Sizers? They should help.

-Chris

ok i tried your idea of putting in the spacein on top of the ChangeTinOut grid object andi was able to make it kind of work, however it's still not really a very good solution.
this is what i want to do

>
> _______________ | | GRID2 |
> _________ | |
> > GRID1 | | |
> >________| |______________|
>________________________________

see how i want to align grid1 with the botton of grid 2? it doesn't seem to be possible because grids dont' report their size, so in order to see the whole grid you have to use EXPAND, which makes ALIGN_BOTTOM impossible.

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Timothy Smith wrote:

run that attached file and you will see right away what is wrong.

I only had a few minutes to mess with it, but I learned a few things:

- You want to use wx.ALIGN_BOTTOM, but NOT wx.EXPAND, then the bottoms line up.

- If you have any stretching of a wx.Grid is seems to screw up where the scroll bars get put--very weird, and it sure looks like a bug to me, at least on GTK. This improves it a little:

     ChangeTinSizer = wx.BoxSizer(wx.HORIZONTAL)
     ChangeTinSizer.Add(self.ChangeTinOut, 0, wx.ALIGN_BOTTOM)
     ChangeTinSizer.Add((1,1), 1)
     ChangeTinSizer.Add(self.ChangeTinIn, 0, wx.ALIGN_BOTTOM)
  
- You might want to use a wx.FlexGridSizer inside the StaticBoxSizers, it should let you line things up better, and be easier.
  
I hope some of this helps,

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                          
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Chris Barker wrote:

Timothy Smith wrote:

run that attached file and you will see right away what is wrong.

I only had a few minutes to mess with it, but I learned a few things:

- You want to use wx.ALIGN_BOTTOM, but NOT wx.EXPAND, then the bottoms line up.

- If you have any stretching of a wx.Grid is seems to screw up where the scroll bars get put--very weird, and it sure looks like a bug to me, at least on GTK. This improves it a little:

        ChangeTinSizer = wx.BoxSizer(wx.HORIZONTAL)
    ChangeTinSizer.Add(self.ChangeTinOut, 0, wx.ALIGN_BOTTOM)
    ChangeTinSizer.Add((1,1), 1)
    ChangeTinSizer.Add(self.ChangeTinIn, 0, wx.ALIGN_BOTTOM)
    - You might want to use a wx.FlexGridSizer inside the StaticBoxSizers, it should let you line things up better, and be easier.
    I hope some of this helps,

-Chris

if i don't use expand, this is what i get with the grids under gtk and windows. i'm using 2.4 mind you, i'm waiting for 2.6.2 (it has a bug fix i need to move my app over to 2.6)
http://www.open-networks.net/screen.jpg

Timothy Smith wrote:

if i don't use expand, this is what i get with the grids under gtk and windows. i'm using 2.4 mind you, i'm waiting for 2.6.2 (it has a bug fix i need to move my app over to 2.6)
http://www.open-networks.net/screen.jpg

Well, that's not good! I tested under wxGTK 2.6.0, and it worked pretty well without wx.EXPAND, so you'll be better off when you can make the upgrade.

Otherwise, I'm out of ideas, but I haven't really used wx.Grid, so maybe someone else can help more.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Chris Barker wrote:

Timothy Smith wrote:

if i don't use expand, this is what i get with the grids under gtk and windows. i'm using 2.4 mind you, i'm waiting for 2.6.2 (it has a bug fix i need to move my app over to 2.6)
http://www.open-networks.net/screen.jpg

Well, that's not good! I tested under wxGTK 2.6.0, and it worked pretty well without wx.EXPAND, so you'll be better off when you can make the upgrade.

Otherwise, I'm out of ideas, but I haven't really used wx.Grid, so maybe someone else can help more.

-Chris

any idea when 2.6.2 will be out?

Chris Barker wrote:

Timothy Smith wrote:

if i don't use expand, this is what i get with the grids under gtk and windows. i'm using 2.4 mind you, i'm waiting for 2.6.2 (it has a bug fix i need to move my app over to 2.6)
http://www.open-networks.net/screen.jpg

Well, that's not good! I tested under wxGTK 2.6.0, and it worked pretty well without wx.EXPAND, so you'll be better off when you can make the upgrade.

Otherwise, I'm out of ideas, but I haven't really used wx.Grid, so maybe someone else can help more.

-Chris

i installed 2.6.1 and tested it out, and your dead right it works better, however whats the go with the scroll bars? even when you can see the whole grid it still shows side and bottom scrollbars

Timothy Smith wrote:

any idea when 2.6.2 will be out?

With Robin away, it's a bit tough, but there are some folks working on it. I have no idea what the time schedule is, however.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Chris Barker wrote:

Timothy Smith wrote:

any idea when 2.6.2 will be out?

With Robin away, it's a bit tough, but there are some folks working on it. I have no idea what the time schedule is, however.

Is he on holidays or has he left the project? I wasn't subsribed the last months. The idea of never again recieving Robin's end-of-day mail collection answering all problems makes makes me sad. What happened?
Christian

About Robin absence see this see this:
http://aspn.activestate.com/ASPN/Mail/Message/wxpython-users/2772413

About the wxPython 2.6.2, probably in this weekend came out something.
Kevin Ollivier is taking care of it.

Ricardo

···

On Fri, 2005-09-23 at 15:40 +0200, Christian Kristukat wrote:

Chris Barker wrote:
> Timothy Smith wrote:
>
>> any idea when 2.6.2 will be out?
>
>
> With Robin away, it's a bit tough, but there are some folks working on
> it. I have no idea what the time schedule is, however.
>

Is he on holidays or has he left the project? I wasn't subsribed the last
months. The idea of never again recieving Robin's end-of-day mail collection
answering all problems makes makes me sad. What happened?
Christian

Ricardo Pedroso wrote:

···

On Fri, 2005-09-23 at 15:40 +0200, Christian Kristukat wrote:

Chris Barker wrote:
   

Timothy Smith wrote:

any idea when 2.6.2 will be out?
       

With Robin away, it's a bit tough, but there are some folks working on it. I have no idea what the time schedule is, however.

Is he on holidays or has he left the project? I wasn't subsribed the last months. The idea of never again recieving Robin's end-of-day mail collection answering all problems makes makes me sad. What happened?
Christian
   
About Robin absence see this see this:
http://aspn.activestate.com/ASPN/Mail/Message/wxpython-users/2772413

About the wxPython 2.6.2, probably in this weekend came out something.
Kevin Ollivier is taking care of it.

Ricardo

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

ok i just hope all is well for robin and that he returns soon.