重新绘制后重新调整Listview滚动条 [英] Listview scrollbar readjusting after repainting

查看:116
本文介绍了重新绘制后重新调整Listview滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在重新绘制列表视图后,如何停止重新调整列表视图滚动条?我希望它保持当前位置.

预先感谢,
-dee

how do I stop the listview scroll bar from readjusting after the listview repaints? I would like for the it to retain its current position.

thanks in advance,
-dee

推荐答案

对不起,我很懒,将其发布.我在每次触发/更新列表视图之后都在清除列表视图...我的解决方案是:最初填充列表视图后,我不再清除它,而只是覆盖现有文本.例如,如果(listview1.Items.Count> 0){listview.Items [0] .Text =随便";等等...
Sorry it was goofy and very lazy of me to post this. I was clearing the the listview after each timer firing/update of the listview...my solution is: after the listview is initially populated I no longer clear it I simply overwrite the existing text. eg if(listview1.Items.Count > 0) { listview.Items[0].Text = "whatever"; etc...


这篇关于重新绘制后重新调整Listview滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆