gpt4 book ai didi

c++ - 如何清除 wxListBox 中的所有选择(使用 wxLB_MULTIPLE)?

转载 作者:行者123 更新时间:2023-11-28 08:10:31 25 4
gpt4 key购买 nike

如何清除样式为 wxLB_MULTIPLE 的 wxListBox 中的所有选择?

都不是wxControlWithItems::SetSelection()也不wxControlWIthItems::SetStringSelection()工作。他们只选择传递的项目,但不会取消选择文档中所述的任何其他项目:

Note that this does not cause any command events to be emitted nor does it deselect any other items in the controls which support multiple selections.

最佳答案

我会使用 wxListBox::GetSelections 其次是 wxListBox::Deselect因为没有取消选择所有方法。

关于c++ - 如何清除 wxListBox 中的所有选择(使用 wxLB_MULTIPLE)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9228091/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com