wxGridCellAttr

This class can be used to alter the cells' appearance in the grid by changing their colour/font/... from default. An object of this class may be returned by wxGridTable::GetAttr().

Derived from

No base class

Include files

<wx/grid.h>



wxGridCellAttr::wxGridCellAttr



wxGridCellAttr(void)

Default constructor.



wxGridCellAttr(const wxColour& colText, const wxColour& colBack, const wxFont& font, int hAlign, int vAlign)

VZ: considering the number of members wxGridCellAttr has now, this ctor seems to be pretty useless... may be we should just remove it?



wxGridCellAttr::Clone

wxGridCellAttr* Clone(void) const

Creates a new copy of this object.



wxGridCellAttr::IncRef



void IncRef(void)

This class is ref counted: it is created with ref count of 1, so calling DecRef() once will delete it. Calling IncRef() allows to lock it until the matching DecRef() is called



wxGridCellAttr::DecRef



void DecRef(void)



wxGridCellAttr::SetTextColour



void SetTextColour(const wxColour& colText)

Sets the text colour.



wxGridCellAttr::SetBackgroundColour



void SetBackgroundColour(const wxColour& colBack)

Sets the background colour.



wxGridCellAttr::SetFont



void SetFont(const wxFont& font)

Sets the font.



wxGridCellAttr::SetAlignment



void SetAlignment(int hAlign, int vAlign)

Sets the alignment.



wxGridCellAttr::SetReadOnly



void SetReadOnly(bool isReadOnly = true)



wxGridCellAttr::SetRenderer



void SetRenderer(wxGridCellRenderer* renderer)

takes ownership of the pointer



wxGridCellAttr::SetEditor



void SetEditor(wxGridCellEditor* editor)



wxGridCellAttr::HasTextColour

bool HasTextColour(void) const

accessors



wxGridCellAttr::HasBackgroundColour

bool HasBackgroundColour(void) const



wxGridCellAttr::HasFont

bool HasFont(void) const



wxGridCellAttr::HasAlignment

bool HasAlignment(void) const



wxGridCellAttr::HasRenderer

bool HasRenderer(void) const



wxGridCellAttr::HasEditor

bool HasEditor(void) const



wxGridCellAttr::GetTextColour

const wxColour& GetTextColour(void) const



wxGridCellAttr::GetBackgroundColour

const wxColour& GetBackgroundColour(void) const



wxGridCellAttr::GetFont

const wxFont& GetFont(void) const



wxGridCellAttr::GetAlignment

void GetAlignment(int* hAlign, int* vAlign) const

wxPerl での注意点: This method takes no parameters and returns a 2-element list ( hAlign, vAlign ).



wxGridCellAttr::GetRenderer

wxGridCellRenderer* GetRenderer(wxGrid* grid, int row, int col) const



wxGridCellAttr::GetEditor

wxGridCellEditor* GetEditor(wxGrid* grid, int row, int col) const



wxGridCellAttr::IsReadOnly

bool IsReadOnly(void) const



wxGridCellAttr::SetDefAttr



void SetDefAttr(wxGridCellAttr* defAttr)

ymasuda 平成17年11月19日