문제

Is there a way to enable multiple selection of properties in a CMFCPropertyGridCtrl?

I want to manipulate several CMFCPropertyGridProperty together e.g. for deleting them.

도움이 되었습니까?

해결책

yes you can do that Make column with check box and you can select with corresponding row. you can select multiple row also. make row with check box also.

for(int i=1;i<= Rowcount;i++) {

    GV_ITEM Item;
    Item.mask |= (GVNI_MODIFIED);
    if (!m_Grid.SetCellType(i,CheckColumn, RUNTIME_CLASS(CGridCellCheckCenter)))
        return;
    CGridCellCheckCenter *pCellCheck = (CGridCellCheckCenter*) m_Grid.GetCell(i,CheckColumn);       
    pCellCheck->SetCheck(false);
    pCellCheck = (CGridCellCheckCenter*) m_Grid.GetCell(i,CheckColumn);         
}

then you check the state of row and get the value of that multiple row. you can go through this site also if u needed http://www.codeproject.com/Articles/479/Tree-control-and-Buttons-for-MFC-Grid-control

다른 팁

No! CMFCPropertyGridCtrl only allows a single selection.

I even have no idea what functionality you want to have with a multiple selection. You can only hit and change only one property. This is the same with the BCG controls.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top