当前位置: 首页>>代码示例>>C++>>正文


C++ CGridCellBase::SetText方法代码示例

本文整理汇总了C++中CGridCellBase::SetText方法的典型用法代码示例。如果您正苦于以下问题:C++ CGridCellBase::SetText方法的具体用法?C++ CGridCellBase::SetText怎么用?C++ CGridCellBase::SetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CGridCellBase的用法示例。


在下文中一共展示了CGridCellBase::SetText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DrawTitle

void QuoteTableCtrlGeneralSort::DrawTitle()
{
	CGridCellBase* pCell;
	for (int col =0; col<GetColumnCount(); col++)
	{

		pCell = GetCell(0, col);
		pCell->SetText("");		
	}
}
开发者ID:hefen1,项目名称:XCaimi,代码行数:10,代码来源:QuoteGeneralSortTabCtrl.cpp

示例2: SetGridCtrlText

void CResiduePane::SetGridCtrlText()
{
	CSTLArrayPDBRenderer & arrayPDBRenderer = m_pProteinVistaRenderer->m_arrayPDBRenderer;
	if ( arrayPDBRenderer.size() == 0 )
		return;

	long vertIndex = 0;
	for ( int iPDB = 0; iPDB < arrayPDBRenderer.size() ; iPDB++ )
	{
		CPDBInst * pPDBInst = arrayPDBRenderer[iPDB]->GetPDBInst();

		for ( int iModel = 0 ; iModel < pPDBInst->m_arrayModelInst.size() ; iModel ++ )
		{
			CModelInst * pModelInst = pPDBInst->m_arrayModelInst[iModel];

			long nChain = pModelInst->m_arrayChainInst.size();
			for ( int iChain = 0 ; iChain < nChain ; iChain ++ )
			{
				CChainInst * pChainInst = pPDBInst->GetChainInst(iModel ,iChain);

				CGridCellBase * pCell = m_residueGridCtrl->GetCell(vertIndex, 0 );
				if ( pCell != NULL )
				{
					if ( pPDBInst->m_arrayModelInst.size() == 1 )
					{
						pCell->SetText(pChainInst->GetChain()->m_strPDBID);
					}
					else
					{
						CString strChain;
						strChain.Format("[%d]%s", iModel, pChainInst->GetChain()->m_strPDBID);
						pCell->SetText(strChain);
					}
					pCell->SetData((LPARAM)(pChainInst));
				}

				for ( int j = 0 ; j < pChainInst->m_arrayResidueInst.size() ; j++ )
				{
					CGridCellBase * pCell = m_residueGridCtrl->GetCell(vertIndex, j+1);
					if ( pCell != NULL )
					{
						BOOL selectColor = 30;
						 

						long ss = pChainInst->m_arrayResidueInst[j]->GetResidue()->GetSS();
						if ( ss == SS_NONE )
							pCell->SetBackClr(RGB(min(180+selectColor,255), min(180+selectColor,255) , min(180+selectColor,255) ));
						else if ( ss == SS_HELIX )
							pCell->SetBackClr(RGB(min(180+selectColor,255), min(selectColor,255), min(selectColor,255) ));
						else if ( ss == SS_SHEET )
							pCell->SetBackClr(RGB(min(selectColor,255) ,min (180+selectColor, 255) ,min(selectColor,255) ));

						CString strText;
						CResidueInst * pResidueInst = pChainInst->m_arrayResidueInst[j];
						if ( m_displayStyle == 0 )
							strText.Format("%s" , pResidueInst->GetResidue()->m_residueNameOneChar);
						if ( m_displayStyle == 1 )
							strText.Format("%d %s" , pResidueInst->GetResidue()->GetResidueNum(), pResidueInst->GetResidue()->m_residueNameOneChar );
						if ( m_displayStyle == 2 )
							strText.Format("%d(%d) %s" , pResidueInst->GetResidue()->GetResidueNum(), j, pResidueInst->GetResidue()->m_residueNameOneChar );
						if ( m_displayStyle == 3 )
							strText.Format("%s" , pResidueInst->GetResidue()->GetResidueName() );
						if ( m_displayStyle == 4 )
							strText.Format("%d %s" , pResidueInst->GetResidue()->GetResidueNum(), pResidueInst->GetResidue()->GetResidueName() );
						if ( m_displayStyle == 5 )
							strText.Format("%d(%d) %s" , pResidueInst->GetResidue()->GetResidueNum(), j, pResidueInst->GetResidue()->GetResidueName() );
						pCell->SetText(strText);
						pCell->SetData((LPARAM)(pResidueInst));
					}
				}
				vertIndex ++;
			}
		}
	}
}
开发者ID:AnthonyNystrom,项目名称:GenXSource,代码行数:75,代码来源:ResiduePane.cpp


注:本文中的CGridCellBase::SetText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。