Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtGridCellColor color selector in header grid Collapse All
Subject Author Date
Luis Alberto Pereira Aug 1, 2007 - 6:19 PM

I have tie follow code in my project. I would like that a CExtGridCellColor cells have a color selector in my second line of a header cells, but do not work properly. The __EGCS_BUTTON_DROPDOWN button is not appear. Can you helpe solve this problem ?

    for(int x = 0; x < nColCount; x++ )
        CPlanoMetas_Cell_Header2* pCell = (CPlanoMetas_Cell_Header2*)
            this->m_grd.GridCellGetOuterAtTop(x, 0L, RUNTIME_CLASS(CPlanoMetas_Cell_Header2));
        CExtGridCellColor * pCellC = (CExtGridCellColor*)
            this->m_grd.GridCellGetOuterAtTop(x, 1L, RUNTIME_CLASS(CExtGridCellColor));
        COLORREF clrLimeGreen = RGB(50,205,50);
        pCellC->SetColor( clrLimeGreen );
        pCellC->m_clrDefault = clrLimeGreen;
        pCellC->SetMode( CExtGridCellColor::eNone);


Luis Alberto Pereira Aug 3, 2007 - 7:03 AM

In complementation of first questions, I verified that when I select the second line of my TreeGrid, the CExtGridCellColor work ok, but when I select all other line, tue dropdown button switch to hide.

Technical Support Aug 6, 2007 - 8:18 AM

The CExtTreeGridWnd and CExtGridWnd controls can display built-in grid cell buttons in:

1) All the cells persistently and independently from any conditions.

2) Focused cells.

3) Selected cells.

4) All the row/column cells where at least one cell is focused in the same row/column.

5) All the row/column cells where at least one cell is selected in the same row/column.

6) Any combination of 2...5 conditions.

These behavior options are controlled by a set of __EGWS_BSE_BUTTONS_*** styles which can be applied using the CExtGridWnd::BseModifyStyle() method.

You can see different behaviors of built-in grid cell buttons in the SimpleGrids sample.