在具有多列的列表框中添加项目 [英] Adding items in a Listbox with multiple columns

查看:18
本文介绍了在具有多列的列表框中添加项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在具有 2 列 的列表中添加项目?如果我使用 ListBox.AddItem,它只会在第一列中添加项目.我也想在 2nd column 中添加项目.谢谢!

How can I add items in a list with 2 columns? It adds the items just in the first column if I use ListBox.AddItem. I want to add items in the 2nd column too. Thanks!

推荐答案

通过使用 List 属性.

ListBox1.AddItem "foo"
ListBox1.List(ListBox1.ListCount - 1, 1) = "bar"

这篇关于在具有多列的列表框中添加项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆