显示列表框中的最后一项 [英] Display last item in listbox
问题描述
你好,我想知道是否有人可以帮忙?我正在将项目添加到具有
的列表框中
大约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 theTopIndex
property.
http://msdn.microsoft.com/en-us/library/system.windows.forms.listbox.aspx[^]
For C++/MFC, it''slistBox.SetTopIndex()
.
http://msdn.microsoft.com/en-us/library/k8cseaky(v=vs.80).aspx[^]
您是否尝试过 ^ ]方法?
您不说您使用的是哪种语言,因此我假设使用C#和WindowsForms.
您的标签"Visual Studio"没有提供任何有用的信息.
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屋!