如何在 ListBox 中让指定的 Item 自动选中

arenwen 2004-04-19 05:22:15
已经知道了ItemIndex 的值,不用鼠标点击即可让此 Item 选中。
...全文
225 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
Bensoon 2004-06-18
  • 打赏
  • 举报
回复 1
ListBox1->Selected[ItemIndex] = true;
futulove 2004-06-16
  • 打赏
  • 举报
回复
ListBox1->Selected[ItemIndex] = true;
这个就可以了
sunmedia 2004-06-16
  • 打赏
  • 举报
回复
ListBox1->IndexItem = ItemIndex; //ItemIndex为你知道的那个ItemIndex的值
slmxy 2004-06-16
  • 打赏
  • 举报
回复
学习!
dreamfeer 2004-06-16
  • 打赏
  • 举报
回复

void __fastcall TForm1::Button3Click(TObject *Sender)
{
ListBox1->Selected[ItemIndex] = true; //选中第ItemIndex行。
}

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧