Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 Listview 来显示一些数据。我需要将焦点保持在列表中的顶部项目上,并且当我捕获 Keypress 时,我希望列表数据随着焦点保持在顶部项目上而滚动。这可能吗?
不,当您滚动列表时,它会在运行时创建元素。
因此,如果您有一个包含 20 个元素的列表,并且列表滚动显示仅显示 10-15 之间的元素,则就像第一个元素不存在一样。