[RESOLVED] Custom control enhancement
http://www.codeproject.com/KB/cpp/mclb.aspx
I have the above control I am using, whose base class is the ListBox.
Unlike the ListBox, it doesn't highlight a new item when it is inserted.
I already had to add the ability to InsertAt() a new item since the person who made it originally hadn't implemented that part.
But, I am having trouble figuring out how to make that part work.
The above link is directly to the original Control.
Here is the code for the Insert method I added:
Code:
Public Sub Insert(ByVal index As Integer, ByVal value As MCListBoxItem)
Try
List.Insert(index, value)
_c += 1
RaiseEvent Changed()
Catch ex As Exception
MsgBox("Insert")
End Try
End Sub
Anyone out there that can help me with this would be greatly appreciated.
I am currently changing the selectedindex in my program but would much rather it be handled in the control.
Re: Custom control enhancement
I don't quite understand the question. You have an Insert method, which is what you want. What is the actual question? If that method doesn't work as you want then please describe exactly what you want to happen and exactly what does happen.
Re: Custom control enhancement
"Unlike the ListBox, it doesn't highlight a new item when it is inserted."
Re: Custom control enhancement
Quote:
Originally Posted by
Seraph
"Unlike the ListBox, it doesn't highlight a new item when it is inserted."
The way that you've written your post indicates that that is a desirable feature of the original control, not an undesirable feature of your modified version.
Quote:
I have the above control I am using, whose base class is the ListBox.
Unlike the ListBox, it doesn't highlight a new item when it is inserted.
I suggest reading your post before submitting and pretending you have no prior knowledge of the problem.
Apart from that, the standard ListBox control doesn't highlight a new item when it's inserted anyway, so that's also a source of confusion.
Re: Custom control enhancement
bah..nevermind...
you're right, it doesn't.
I did it in my code.
I forgot I did that and was thinking that the ListBox itself does that.
Re: [RESOLVED] Custom control enhancement