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

T

tinnews

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?
 
I

Ian Kelly

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.
 
T

tinnews

Ian Kelly said:
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().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top