滚动时可见的列表框项目找出可见状态. [英] Listbox Item visible while scrolling Find out visible state.

查看:79
本文介绍了滚动时可见的列表框项目找出可见状态.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

一个列表框包含100个启用了垂直滚动条的列表框项.
现在列表框显示(可见)10个项目.如果我滚动查看下一个11号项目,现在隐藏第一号项目(内部,它刚好位于列表框顶部).

现在我的问题是如何找出该特定项目是否可见,而其他所有项目是否都隐藏在列表框中.

我的问题清楚吗?还是让我感到困惑?




问候
Jegan

Hi All,

A listbox contains 100 listbox items with vertical scrollbar enabled.
now list box is displaying (visible) 10 items. If i scroll next 11th item is visible and 1st item is hidden now (internally ,it just gone up list box top).

Now my question is how to find out whether that particular item is visible and all others are hidden in the listbox.

Is my question clear? or am i confusing?




Regards
Jegan

推荐答案

私有子Form1_Load(ByVal发送者作为System.Object,ByVal e作为System.EventArgs)处理MyBase.Load
ListBox1.SelectedIndex = 0

结束子

私有子Button1_Click(ByVal发送者为System.Object,ByVal e为System.EventArgs)处理Button1.Click
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 10
MsgBox(ListBox1.SelectedIndex)
结束Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ListBox1.SelectedIndex = 0

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 10
MsgBox(ListBox1.SelectedIndex)
End Sub


这篇关于滚动时可见的列表框项目找出可见状态.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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