【发布时间】:2018-12-05 23:08:41
【问题描述】:
我创建了一个访问数据库表单,该表单在列表框中显示用户列表及其工作效率。但是,当我获得超过 20 个用户时,列表框无法在不滚动的情况下显示其余用户。
有没有一种方法可以让列表框自动滚动到底部,然后像在无限循环中播放的电影中的片尾字幕一样重置到顶部?
【问题讨论】:
标签: ms-access listbox vba ms-access-2016 autoscroll
我创建了一个访问数据库表单,该表单在列表框中显示用户列表及其工作效率。但是,当我获得超过 20 个用户时,列表框无法在不滚动的情况下显示其余用户。
有没有一种方法可以让列表框自动滚动到底部,然后像在无限循环中播放的电影中的片尾字幕一样重置到顶部?
【问题讨论】:
标签: ms-access listbox vba ms-access-2016 autoscroll
按照您的要求,我认为您需要构建自己的滚动条! 我会用这些东西来实现:
伪代码:
Init:
clear the text box
load the array with the text & append each line to the text box as you go.
set the pointer to 1
UpdateText (timer event):
' get length of current string
iLength = array(counter).text.length
' chop the first row off the text
textbox.text = right(textbox.text, len(textbox.text) - iLength)
' add the text back on to the end
textbox.text.appendtext( array(counter).text)
increment counter
if counter > array-num-items, set counter to 1 ' scroll over
玩得开心!
【讨论】: