Uhm... You'll have to set the alignment cell by cell with the
SetCellAlignment(row, col, horiz, vert) method.
Take a look at this little example:
self.CreateGrid(5, 3)
col_h_alignment = (wx.ALIGN_LEFT, wx.ALIGN_CENTRE, wx.ALIGN_RIGHT)
col_v_alignment = (wx.ALIGN_TOP, wx.ALIGN_CENTRE, wx.ALIGN_BOTTOM)
for row in range(5):
for col in range(3):
self.SetCellValue(row, col, "Column %i" % col)
self.SetCellAlignment(row, col, col_h_alignment[col],
col_h_alignment[col])
The complete version is here: http://pastebin.com/f227735d4
Regards,
Marcelo
--
Marcelo F. Fernández
Buenos Aires, Argentina
Licenciado en Sistemas - CCNA
E-Mail: fernan...@yahoo.com.ar
Jabber ID: fernan...@jabber.org
Public Key ID: 5C990A6C 111C3661
Blog: http://marcelosoft.blogspot.com
Create a GridCellAttr object, set the alignment flags on the attr object
and then pass the attr to SetColAttr.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
_______________________________________________
wxpython-users mailing list
wxpytho...@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
grid.SetDefaultCellAlignment(WX.CENTRE, wx.CENTRE)
My previous post left out the second 'wx.'
--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/How-to-set-grid-default-col-alignment-tp2372996p4336562.html
Sent from the wxPython-users mailing list archive at Nabble.com.