显示列表框中的最后一项 [英] Display last item in listbox

查看:204
本文介绍了显示列表框中的最后一项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我想知道是否有人可以帮忙?我正在将项目添加到具有
的列表框中 大约10行.当我添加数字11时,我希望列表框向下移动,以便显示
11号,所以我没有一直使用向下滚动.环顾四周并尝试了几种方法
但找不到答案.

希望我已经解释了这个确定,很难解释!


预先感谢,

戴夫.

对不起,我的应用程序的Visual Basic 2010-Visual Studio 2010-Windows窗体

再次抱歉,我是编程新手,并且对该网站非常新!甚至不确定人们要我在标签中放什么!!

使用Microsoft Networks .Net版本4.0-再次由于缺少详细信息而感到抱歉.希望这就是您要的.

哦,是的,谢谢您这么理解!

Hi there, Was wondering if anyone could help ?? I am adding items to a listbox that has
around 10 lines. When i add number 11 i want the list box to move down so it shows
number 11 so i dont have keep using the scroll down. Had a good look around and tried a few ways
but can not find an answer.

Hopefully i have explained this ok find it hard to explain !!!


Thanks in advance ,

Dave.

Sorry my appologies its visual basic 2010 - visual studio 2010 - Windows form

Sorry yet again i am new to programming and very new to this site !!!!! Not even sure what people want me put in tags !!

Using microsoft Networks .Net Version 4.0 - Again sorry for lack of details. Hopefully this is what you have asked me for.

Oh yes and thank you for being so understanding !!

推荐答案

您没有提到平台(非托管C ++或.Net)

对于.Net,设置TopIndex属性.

http://msdn.microsoft.com/en-us/library/system. windows.forms.listbox.aspx [ ^ ]

对于C ++/MFC,它是listBox.SetTopIndex().

http://msdn.microsoft.com/en-us/library/k8cseaky (v = vs.80).aspx [
You didn''t mention the platform (unmanaged C++ or .Net)

For .Net, set the TopIndex property.

http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.aspx[^]

For C++/MFC, it''s listBox.SetTopIndex().

http://msdn.microsoft.com/en-us/library/k8cseaky(v=vs.80).aspx[^]


您是否尝试过
Have you tried the Listbox.ScrollIntoView()[^] method?

You do not say which language you are using, so I have assumed C# and WindowsForms.

Your tag ''Visual-Studio'' imparts no useful information.


这篇关于显示列表框中的最后一项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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