
How to programmicly cause Listview to display its text from another line not in view
Thanks Randy for that info on the listbox's right click
Was just wondering as listview compared to the listbox control
its a simple means to change the visual location of lines displayed
example
100 Items were added to a listbox, items 1-10 are being displayed and
Item 1 is selected the program does a
list1.selected(15) = True
and the listbox scrolls down to display that line selected in view
now.
As opposed to the listview using the select does not seem to do that
is there an easy way of doing so.
Also I've noticed a big proformace degradation using the listview
control I realize that there are more features with it .
If I replace a line in the listbox control as follows
fMainForm.List1.RemoveItem fMainForm.List1.ListCount - 1
fMainForm.List1.AddItem (Format(XconRcn - 1, "000000") & "
* " & textline)
fMainForm.List1.Selected((fMainForm.List1.ListCount - 1))
= True
its instantaneous as opposed to the listview control. When you do a
remove line with the listview you see all the lines following move up
they do that in the listbox control but very quickly, were it is not
noticeably
Form1.ListView1.ListItems.Remove (x)
Form1.ListView1.ListItems.Add(x) = ("A - " & holdlist)
then if you add a change of color for that line I can go have a cup of
coffee and a donuts before the movement stops.............
Form1.ListView1.ListItems.Item(x).ForeColor = vbBlue
Form1.ListView1.ListItems.Item(x).Bold = True
'This does not repositions the lines which I want
Form1.ListView1.SelectedItem.Selected = true
'Nor this
Form1.ListView1.ListItems(x).Selected = True
Any suggestions
THX
John