D
Derrick Repep
Hi,
I have a VB.NET Windows form that contains a list box. As events occur, I
am adding text to the list box to provide a status update to the user (and
so the user can scroll up to see what occurred). The issue I am having is
that I want the latest status updates (the ones at the bottom of the list)
to be contained within the list box's viewable area as they are added.
Assume the list box is sized so that it can show three lines of text. Given
ten items in the collection, I would like to have items with (zero-based)
indices 7, 8 and 9 shown; when the eleventh item is added, I would like to
show (zero-based) indices 8, 9 and 10.
The addition of items to the collection happens in one place, so there can
be wrapper code to cause this to happen if necessary. Of course, a property
setting would be ideal, but I'll take what I can get. ;-)
Any suggestions? Thanks in advance!
Derrick
I have a VB.NET Windows form that contains a list box. As events occur, I
am adding text to the list box to provide a status update to the user (and
so the user can scroll up to see what occurred). The issue I am having is
that I want the latest status updates (the ones at the bottom of the list)
to be contained within the list box's viewable area as they are added.
Assume the list box is sized so that it can show three lines of text. Given
ten items in the collection, I would like to have items with (zero-based)
indices 7, 8 and 9 shown; when the eleventh item is added, I would like to
show (zero-based) indices 8, 9 and 10.
The addition of items to the collection happens in one place, so there can
be wrapper code to cause this to happen if necessary. Of course, a property
setting would be ideal, but I'll take what I can get. ;-)
Any suggestions? Thanks in advance!
Derrick