]> git.saurik.com Git - wxWidgets.git/commit - src/generic/gridctrl.cpp
Allow changing horizontal alignment of numeric cells in wxGrid.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 27 Nov 2009 01:47:38 +0000 (01:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 27 Nov 2009 01:47:38 +0000 (01:47 +0000)
commitcfbc15ee049cbd53366d5770240c06b621de18e1
treefaea488898cb01c7754db75bb219aac845d2c0bd
parentba0185b55709e92abe507a0d51afce518767a51f
Allow changing horizontal alignment of numeric cells in wxGrid.

wxGridCellAttr didn't provide any way to query its alignment attributes
without falling back to the (always defined) default alignment so the code in
wxGridCellNumberRenderer and similar classes simply always used right
alignment,

Add a new wxGridCellAttr::GetNonDefaultAlignment() function which allows to
retrieve the alignment defined in the attribute and use it to use right
alignment by default but allow overriding it.

Add a test to the sample showing a non right-aligned numeric cell.

Incidentally fix a long-standing bug in wxGridCell{DateTime,Enum}Renderers
which used wxRIGHT instead of wxALIGN_RIGHT and so were not aligned properly
even by default.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
docs/changes.txt
include/wx/generic/grid.h
interface/wx/grid.h
samples/grid/griddemo.cpp
src/generic/grid.cpp
src/generic/gridctrl.cpp