Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: tinnews@isbd.co.uk Newsgroups: comp.lang.python Subject: Re: wxgrid - is there an easy way to set alignment of a column? Date: Fri, 15 Mar 2013 18:29:08 +0000 Lines: 20 Message-ID: References: X-Trace: individual.net 9mrX46V7tpFkPdbONMNdpQikS2B6D1+k+Dw6dJcgGbLKQK830= X-Orig-Path: not-for-mail Cancel-Lock: sha1:/Wtygg/9cX5S67bIwJ73xwSHJHs= sha1:A2kmManM9SP+BzYvfCpcAiwVBgQ= User-Agent: tin/2.1.1-20120623 ("Mulindry") (UNIX) (Linux/3.5.0-25-generic (x86_64)) Xref: csiph.com comp.lang.python:41286 Ian Kelly wrote: > On Fri, Mar 15, 2013 at 5:50 AM, 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