How to tell the visible items in listBox control.

G

Guest

Supposed I have 100 items or datarows to bind listBox control. and the
control can only display 10 rows. So I need to tell the scope of the visible
rows.

Thanx in advance
 
H

Herfried K. Wagner [MVP]

Rulin Hong said:
Supposed I have 100 items or datarows to bind listBox control. and the
control can only display 10 rows. So I need to tell the scope of the
visible
rows.

\\\
MsgBox( _
"Top index: " & _
CStr(Me.ListBox1.TopIndex) _
)
MsgBox( _
"Number of max. fully visible items: " & _
CStr( _
Me.ListBox1.ClientSize.Height \ _
Me.ListBox1.ItemHeight _
) _
)
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top