Professional UI Solutions
Site Map   /  Register
 
 

Forum

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 Tech Support » CExtGridCellDropListComboBox with ellipsis button bug Collapse All
Subject Author Date
Offer Har Apr 4, 2008 - 5:50 AM

I have a cell of type CExtGridCellDropListComboBox with ellipsis I set using ModifyStyle(__EGCS_BUTTON_ELLIPSIS)


I override OnGridCellButtonPressed, and wait for the ellipsis to be pressed. NO mater where I press in the cell, nButtonType is always __EBTT_DROPDOWN, and never __EBTT_ELLIPSIS. It seems that this cell type eats all its areas and makes it into one big drop down, but this should not be including the ellipsis button.


If I change the cell type to a CExtGridCellComboBox, then everything is good.


Ron.

Technical Support Apr 8, 2008 - 1:06 PM

Thank you for reporting the problem. We have just fixed it. Please update the following method:

bool CExtGridCellDropListComboBox::OnClick(
    CExtGridWnd & wndGrid,
    const CExtGridHitTestInfo & htInfo,
            UINT nChar, // VK_LBUTTON, VK_RBUTTON or VK_MBUTTON only
            UINT nRepCnt, // 0 - button up, 1 - single click, 2 - double click, 3 - post single click & begin editing
            UINT nFlags // mouse event flags
    )
{
            ASSERT_VALID( this );
            ASSERT_VALID( (&wndGrid) );
            ASSERT( ! htInfo.IsHoverEmpty() );
            ASSERT( htInfo.IsValidRect() );
            ASSERT( nChar == VK_LBUTTON || nChar == VK_RBUTTON || nChar == VK_MBUTTON );
            ASSERT( 0 <= nRepCnt && nRepCnt <= 3 );
bool bRetVal =
                        CExtGridCellString::OnClick(
                                   wndGrid,                
                                   htInfo,                
                                   nChar,                
                                   nRepCnt,                
                                   nFlags                
                                   );
DWORD dwCellStyle = GetStyle();
            if( (dwCellStyle&__EGCS_READ_ONLY) != 0 )
                        return bRetVal;
            if( nChar == VK_LBUTTON && (nRepCnt == 1 || nRepCnt == 2) )
            { 
                        // if single left button click
                        if(                     (htInfo.m_dwAreaFlags&__EGBWA_CELL_BUTTON) == 0 
                                   &&       (htInfo.m_dwAreaFlags&__EGBWA_CELL_CHECKBOX) == 0
                                   &&       (nFlags&(MK_SHIFT|MK_CONTROL)) == 0
                                   )
                        {
            CExtGridHitTestInfo htInfoTrack( htInfo );
            htInfoTrack.m_dwAreaFlags |= __EGBWA_CELL_BUTTON;
            htInfoTrack.m_nButtonType = (int)__EBTT_DROPDOWN;
            return
                wndGrid.OnGridTrackCellButton(
                    this,
                    htInfoTrack
                    );
                        }
            }
    return bRetVal;
}