0
点赞
收藏
分享

微信扫一扫

UG\NX二次开发 遍历BlockUI树列表,获取、设置单元格的值


文章作者:里海

简介:

遍历BlockUI树列表,获取、设置单元格的值

效果:

      

UG\NX二次开发 遍历BlockUI树列表,获取、设置单元格的值_获取值

代码:

BlockStyler::Node* theNode = tree_control0->RootNode();
while (theNode != NULL)
{
    //获取值
	string strName = theNode->GetColumnDisplayText(0).GetLocaleText();
	string strValue = theNode->GetColumnDisplayText(1).GetLocaleText();
    
    //设置值
	theNode->SetColumnDisplayText(0, "王牌飞行员");
	theNode->SetColumnDisplayText(1, "lihai");

	BlockStyler::Node* nextNod = theNode->NextSiblingNode();
	theNode = nextNod;
}

举报

相关推荐

0 条评论