Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41267 > unrolled thread

wxgrid - is there an easy way to set alignment of a column?

Started bytinnews@isbd.co.uk
First post2013-03-15 11:50 +0000
Last post2013-03-15 18:29 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  wxgrid - is there an easy way to set alignment of a column? tinnews@isbd.co.uk - 2013-03-15 11:50 +0000
    Re: wxgrid - is there an easy way to set alignment of a column? Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-15 09:50 -0600
      Re: wxgrid - is there an easy way to set alignment of a column? tinnews@isbd.co.uk - 2013-03-15 18:29 +0000

#41267 — wxgrid - is there an easy way to set alignment of a column?

Fromtinnews@isbd.co.uk
Date2013-03-15 11:50 +0000
Subjectwxgrid - is there an easy way to set alignment of a column?
Message-ID<ggeb1a-9kk.ln1@chris.zbmc.eu>
I'm using wxGrid and finding it fairly straightforward but I can't see
an easy way to set the alignment (left, centre, right) for a whole
column. 

There's SetDefaultCellAlignment() which sets the default for the whole
grid and there's SetCellAlignment() which sets it for a specific cell
but there seems to be no way to set the default alignment for a column.

Am I missing something or do I need to do it for individual cells as I
load the data?

-- 
Chris Green

[toc] | [next] | [standalone]


#41279

FromIan Kelly <ian.g.kelly@gmail.com>
Date2013-03-15 09:50 -0600
Message-ID<mailman.3345.1363362683.2939.python-list@python.org>
In reply to#41267
On Fri, Mar 15, 2013 at 5:50 AM,  <tinnews@isbd.co.uk> wrote:
> I'm using wxGrid and finding it fairly straightforward but I can't see
> an easy way to set the alignment (left, centre, right) for a whole
> column.
>
> There's SetDefaultCellAlignment() which sets the default for the whole
> grid and there's SetCellAlignment() which sets it for a specific cell
> but there seems to be no way to set the default alignment for a column.
>
> Am I missing something or do I need to do it for individual cells as I
> load the data?

You can use SetColAttr() to set attributes over a whole column.

[toc] | [prev] | [next] | [standalone]


#41286

Fromtinnews@isbd.co.uk
Date2013-03-15 18:29 +0000
Message-ID<ks5c1a-3dp.ln1@chris.zbmc.eu>
In reply to#41279
Ian Kelly <ian.g.kelly@gmail.com> wrote:
> On Fri, Mar 15, 2013 at 5:50 AM,  <tinnews@isbd.co.uk> wrote:
> > I'm using wxGrid and finding it fairly straightforward but I can't see
> > an easy way to set the alignment (left, centre, right) for a whole
> > column.
> >
> > There's SetDefaultCellAlignment() which sets the default for the whole
> > grid and there's SetCellAlignment() which sets it for a specific cell
> > but there seems to be no way to set the default alignment for a column.
> >
> > Am I missing something or do I need to do it for individual cells as I
> > load the data?
> 
> You can use SetColAttr() to set attributes over a whole column.

Ah, yes, thank you.  It's a bit of a long way round though and, in my
case I think it's simpler just to use SetCellAlignment().

-- 
Chris Green

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web