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 » Misunderstood or incorrect behavior of CExtGridCellComboBox Collapse All
Subject Author Date
Svetlozar Kostadinov Jun 11, 2007 - 5:20 AM

Hello,

Please, may you look at the following thing... First open PropertyGrid sample. Select one random star and look at "Animation" property item. There’s no text, even that the item’s value is initialized in the constructor. But the text is gone also when you try to change the combo value by yourself and then deselect and select the star again. This refresh doesn’ help. In our project the behavior of CExtGridCellComboBox is the same, even worse. Programatically CExtGridCellComboBox::GetCurSel() returns -1 (unselected), even if I select a value manualy or programatically. That’s it. Could you investigate is this correct or I miss something? We are using 2.70 Unicode.

Best Regards,
Sv.Asenov

Technical Support Jun 11, 2007 - 6:49 AM

We have recently fixed a bug in the CExtGridCellComboBox class. Please update the following method and recompile the library.

void CExtGridCellComboBox::Assign( const CExtGridCell & other )
{
    ASSERT_VALID( this );
    CExtGridCellString::Assign( other );
CExtGridCellComboBox * pCell =
        DYNAMIC_DOWNCAST(
            CExtGridCellComboBox,
            ( const_cast < CExtGridCell * > ( &other ) )
            );
    ResetContent();
    if( pCell != NULL )
    {
        // copy cell items
        ITEM_INFO * pItemCurSel = NULL;
        LONG nItem = 0;
        for( nItem = 0; nItem < pCell->m_arrItems.GetSize(); nItem++ )
        {
            ITEM_INFO * pOtherItem = pCell->m_arrItems[ nItem ];
            ITEM_INFO * pNewItem = new ITEM_INFO( *pOtherItem );
            m_arrItems.Add( pNewItem );
            if( pCell->m_pCurSel == pOtherItem )
                pItemCurSel = pNewItem;
        }
        m_bEnumMode = pCell->m_bEnumMode;
        SetImageList( pCell->m_pImageList );
        if( pItemCurSel != NULL )
        {
            nItem = _GetIndexOf( pItemCurSel );
            SetCurSel( nItem );
        }
    } // if( pCell != NULL )
}
If the problem persists, please let us know.

Svetlozar Kostadinov Jun 12, 2007 - 8:08 AM

Thank you, guys! You’re so fast! I’ll try it and let you know how it works.

Svetlozar Kostadinov Jun 18, 2007 - 4:56 AM

Ok, the initial values are correct, but I faced another problem which maybe isn’t a bug. When I change a value of combo cell, then deselect the object and select it again, the combo is cleared and empty somehow. Probably it is only my problem, cause in the property samples, there isn’t such a problem.