C++ (Cpp) wxSheetCellRenderer Example

Introduction

The c++ (cpp) wxsheetcellrenderer example is extracted from the most popular open source projects, you can refer to the following example for usage.

Programming language: C++ (Cpp)

Class/type: wxSheetCellRenderer

Example#1
File: sheetren.cppProject: stahta01/wxCode_components

bool wxSheetCellRenderer::Copy(const wxSheetCellRenderer& other)
{
    wxCHECK_MSG(other.Ok(), false, wxT("wxSheetCellRenderer is not created"));

    UnRef();
    m_refData = ((wxSheetCellRendererRefData*)other.m_refData)->Clone();
    return true;
}

Example#2
File: sheetatr.cppProject: NalinG/gambit

void wxSheetCellAttr::SetRenderer(const wxSheetCellRenderer& renderer)
{ 
    wxCHECK_RET(m_refData, wxT("wxSheetCellAttr not initializied"));
    if (M_CELLATTRDATA->m_renderer)
    {
        delete M_CELLATTRDATA->m_renderer;
        M_CELLATTRDATA->m_renderer = NULL;
    }
    if (renderer.Ok())
        M_CELLATTRDATA->m_renderer = new wxSheetCellRenderer(renderer); 
}