|
-
Jan 27th, 2000, 07:56 AM
#1
Thread Starter
New Member
Is anyone could show me how to keep the recently added item in ListBox highlighted (selected) so that it is shown on screen?
By simply using the AddNew method to add items to ListBox, the ListBox always shows the few items at top (starting from item0,1 and so on). After filling the total height of ListBox, the newly added item could not be seen on screen. Is any way to keep the ListBox Updated and shows the most recent items? Thanks in advance.
-
Jan 27th, 2000, 08:18 AM
#2
Use the TopIndex Property of the Listbox, ie.
Code:
Private Sub Command1_Click()
Dim iIndex As Integer
For iIndex = 0 To 10000
List1.AddItem "Item " & iIndex
List1.TopIndex = iIndex
Next
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Jan 27th, 2000, 10:42 AM
#3
Thread Starter
New Member
Thank you Aaron for your help, I tried your tip and it works very well.
WG
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|