【NX二次开发】Block UI 列表框

属性说明

常规         类型 描述
    BlockID     String 控件ID
    Enable     Logical 是否可操作
    Group     Logical 是否分组
    Label     Utfstring 标题
    Show     Logical 是否可见
其他            
    Localize     Logical 是否本地化
    附件        
        Bottom Attachment 底部
        Left Attachment
        Right Attachment
        Top Attachment 顶部
特定于块            
    AllowDeselectForSingleSelect Logical 允许取消单选内容
    Height Integer 高度
    ListItems Utfstrings 列表内容
    MaximumHeight Integer 最大高度
    MaximumStringLength Integer 最大字符串长度
    MinimumHeight Integer 最小高度
    ResizeHeightWithDialog Logical 调整对话框高度
    ShowAddButton Logical 是否显示添加按钮
    ShowDeleteButton Logical 是否显示删除按钮
    ShowMoveUpDownButtons Logical 是否显示上下移动按钮
    SingleSelect Logical 是否单选
     

 

设置列表框高度

list_box0->SetHeight(6);//列表框高度6

设置控件的值

1 std::vector<NXString> vecPartName;
2 NXString temp="";
3 char cTemp[256];
4 sprintf(cTemp,"%s",strPartName.c_str());
5 temp=cTemp;
6 vecPartName.push_back(temp);
7 list_box0->SetListItems(vecPartName);

 

posted @ 2020-07-20 16:12  王牌飞行员_里海  阅读(409)  评论(0编辑  收藏  举报