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 General Discussion » Can I ask 2 questions about Property-control? Collapse All
Subject Author Date
ki okju Oct 21, 2005 - 3:25 AM

Thank you for your lib.


I want ask 2 question. 


 1.  I want  to  that ’CExtPropertyGridComboBoxBar’ did not seeing.


 2. And Read-Only type is text-color is too watery. Can I make text to ’dark-color’?


 


  

Technical Support Oct 21, 2005 - 9:38 AM

Here are the answers to your questions:

1. To hide the property grid’s combo box, use the following code:

    CExtPropertyGridComboBoxBar * pWnd =
        STATIC_DOWNCAST(
            CExtPropertyGridComboBoxBar,
            m_PGC.GetChildByRTC(
                RUNTIME_CLASS(CExtPropertyGridComboBoxBar)
                )
            );
    if( pWnd != NULL )
    {
        pWnd->ShowWindow( SW_HIDE );
        m_PGC.RecalcLayout();
    }
2. To change the colors of the read-only edit, create a cell class and override its OnInplaceControlCreate virtual method. Here the code which sets the text color to red and the background color to green
HWND CMyGridCellString::OnInplaceControlCreate(
    CExtGridWnd & wndGrid,
    LONG nVisibleColNo,
    LONG nVisibleRowNo,
    LONG nColNo,
    LONG nRowNo,
    INT nColType,
    INT nRowType,
    const RECT & rcCellExtra,
    const RECT & rcCell,
    const RECT & rcInplaceControl,
    LONG nLastEditedColNo,
    LONG nLastEditedRowNo
    )
{
    ASSERT_VALID( this );
    ASSERT_VALID( (&wndGrid) );
    
    HWND hWndEdit =
        CExtGridCell::OnInplaceControlCreate(
            wndGrid,
            nVisibleColNo,
            nVisibleRowNo,
            nColNo,
            nRowNo,
            nColType,
            nRowType,
            rcCellExtra,
            rcCell,
            rcInplaceControl,
            nLastEditedColNo,
            nLastEditedRowNo
            );
    if( hWndEdit == NULL )
        return NULL;
 
    CExtGridInplaceEdit * pEdit = 
        static_cast < CExtGridInplaceEdit * > ( CWnd::FromHandle( hWndEdit ) );
    ASSERT( pEdit != NULL );
    ASSERT_VALID( pEdit );
    pEdit->SetTextColor( RGB(255,0,0) );
    pEdit->SetBkColor( RGB(0,255,0) );
 
    return hWndEdit;
}

ki okju Oct 23, 2005 - 11:33 PM

  Thank you for your answer!! ˆˆ