alignment because wxALIGN_LEFT and wxALIGN_TOP are 0.
Updated griddemo.cpp to use correct alignment defs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7864
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxGridCellAttr()
{
Init();
wxGridCellAttr()
{
Init();
+ // MB: args used to be 0,0 here but wxALIGN_LEFT is 0
+ SetAlignment(-1, -1);
}
// VZ: considering the number of members wxGridCellAttr has now, this ctor
}
// VZ: considering the number of members wxGridCellAttr has now, this ctor
bool HasTextColour() const { return m_colText.Ok(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); }
bool HasFont() const { return m_font.Ok(); }
bool HasTextColour() const { return m_colText.Ok(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); }
bool HasFont() const { return m_font.Ok(); }
- bool HasAlignment() const { return m_hAlign || m_vAlign; }
+ bool HasAlignment() const { return (m_hAlign != -1 || m_vAlign != -1); }
bool HasRenderer() const { return m_renderer != NULL; }
bool HasEditor() const { return m_editor != NULL; }
bool HasRenderer() const { return m_renderer != NULL; }
bool HasEditor() const { return m_editor != NULL; }
grid->SetCellBackgroundColour(3, 3, *wxLIGHT_GREY);
grid->SetCellValue(4, 4, "a weird looking cell");
grid->SetCellBackgroundColour(3, 3, *wxLIGHT_GREY);
grid->SetCellValue(4, 4, "a weird looking cell");
- grid->SetCellAlignment(4, 4, wxCENTRE, wxCENTRE);
+ grid->SetCellAlignment(4, 4, wxALIGN_CENTRE, wxALIGN_CENTRE);
grid->SetCellRenderer(4, 4, new MyGridCellRenderer);
grid->SetCellValue(3, 0, "1");
grid->SetCellRenderer(4, 4, new MyGridCellRenderer);
grid->SetCellValue(3, 0, "1");
- case wxLEFT:
- horiz = wxCENTRE;
+ case wxALIGN_LEFT:
+ horiz = wxALIGN_CENTRE;
- case wxCENTRE:
- horiz = wxRIGHT;
+ case wxALIGN_CENTRE:
+ horiz = wxALIGN_RIGHT;
- case wxRIGHT:
- horiz = wxLEFT;
+ case wxALIGN_RIGHT:
+ horiz = wxALIGN_LEFT;
- case wxTOP:
- vert = wxCENTRE;
+ case wxALIGN_TOP:
+ vert = wxALIGN_CENTRE;
- case wxCENTRE:
- vert = wxBOTTOM;
+ case wxALIGN_CENTRE:
+ vert = wxALIGN_BOTTOM;
- case wxBOTTOM:
- vert = wxTOP;
+ case wxALIGN_BOTTOM:
+ vert = wxALIGN_TOP;
- case wxLEFT:
- horiz = wxCENTRE;
+ case wxALIGN_LEFT:
+ horiz = wxALIGN_CENTRE;
- case wxCENTRE:
- horiz = wxRIGHT;
+ case wxALIGN_CENTRE:
+ horiz = wxALIGN_RIGHT;
- case wxRIGHT:
- horiz = wxLEFT;
+ case wxALIGN_RIGHT:
+ horiz = wxALIGN_LEFT;
- case wxTOP:
- vert = wxCENTRE;
+ case wxALIGN_TOP:
+ vert = wxALIGN_CENTRE;
- case wxCENTRE:
- vert = wxBOTTOM;
+ case wxALIGN_CENTRE:
+ vert = wxALIGN_BOTTOM;
- case wxBOTTOM:
- vert = wxTOP;
+ case wxALIGN_BOTTOM:
+ vert = wxALIGN_TOP;