ListBox窗体显示问题

ListBox.AddItem()方法:当添加的索引为列表框值的索引时,按理说是添加到所选项前面,但是这时候如果去选择列表框会发现显示bug,原来的值形成了无法取消的选中状态,但是实测并没有选中,希望官方能解决该问题。

function UserForm2_CommandButton1_Click(){

//向前添加

const writeAccountType = UserForm2.TextEdit1.Text;

if(!writeAccountType){

MsgBox("未输入值,无法添加!",jsOKOnly);

return;

}

const pathName = UserForm2.ListBox1;

const selectValue = pathName.Value;

if(!selectValue){

MsgBox("未选中值,无法删除!",jsOKOnly);

return;

}

const list = getListBoxList(pathName);

const index = list.indexOf(selectValue);

pathName.AddItem(writeAccountType,index);

UserForm2.TextEdit1.Text = null;

}

江苏省
浏览 303
收藏
2
分享
2 +1
1
+1
全部评论 1
 
WPS反馈小助理小雅
WPS反馈小助理小雅

WPS社区反馈员

您好~详情的表格问题情况及使用的客户端版本可以反馈下,这边核实看看~ https://f.wps.cn/g/moh1RoMi/
· 广东省
回复