gpt4 book ai didi

c# - listbox selectionmode = multiextended 如何摆脱按下鼠标键选择项目

转载 作者:行者123 更新时间:2023-11-30 15:10:23 54 4
gpt4 key购买 nike

将列表框选择模式设置为多扩展时,我观察到三种选择项目的方法:

  1. 按住 shift 键的同时按下鼠标键
  2. 按住 ctrl 键的同时按下鼠标键
  3. 在将鼠标移到未选择的项目上时按下鼠标键

1 和 2. 正是我想要的行为,但我不想要 3.因为稍后我想通过使用鼠标上下移动所有选定的项目来重新排列项目。

如何摆脱 3. ?

我需要一种行为,就像 Winamp 中的播放列表一样。通过拖动和复制粘贴项目重新排列项目

最佳答案

ListBox类有两种SelectionMode。多个或扩展。

In Multiple mode, you can select or deselect any item by clicking it. In Extended mode, you need to hold down the Ctrl key to select additional items or the Shift key to select a range of items.

需要设置适当的属性。

关于c# - listbox selectionmode = multiextended 如何摆脱按下鼠标键选择项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3339225/

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