|
-
Mar 8th, 2010, 11:31 PM
#1
Thread Starter
Fanatic Member
[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.
Visual Studio 2010 Professional | .NET Framework 4.0 | Windows 7
SERYSOFT.COM :: SysPad - Folder Management Program - Please comment HERE if you find this program useful, have ideas, or know of any bugs.
[Very useful for IT/DP departments where many folders are consistently accessed. Also contains a scratchpad window for quick access to notes.]
[.NET and MySQL Quick Guide]
-
Mar 8th, 2010, 11:49 PM
#2
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.
-
Mar 8th, 2010, 11:52 PM
#3
Thread Starter
Fanatic Member
Re: Custom control enhancement
"Unlike the ListBox, it doesn't highlight a new item when it is inserted."
Visual Studio 2010 Professional | .NET Framework 4.0 | Windows 7
SERYSOFT.COM :: SysPad - Folder Management Program - Please comment HERE if you find this program useful, have ideas, or know of any bugs.
[Very useful for IT/DP departments where many folders are consistently accessed. Also contains a scratchpad window for quick access to notes.]
[.NET and MySQL Quick Guide]
-
Mar 9th, 2010, 12:02 AM
#4
Re: Custom control enhancement
 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.
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.
-
Mar 9th, 2010, 12:54 AM
#5
Thread Starter
Fanatic Member
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.
Visual Studio 2010 Professional | .NET Framework 4.0 | Windows 7
SERYSOFT.COM :: SysPad - Folder Management Program - Please comment HERE if you find this program useful, have ideas, or know of any bugs.
[Very useful for IT/DP departments where many folders are consistently accessed. Also contains a scratchpad window for quick access to notes.]
[.NET and MySQL Quick Guide]
-
Mar 9th, 2010, 12:55 AM
#6
Re: [RESOLVED] Custom control enhancement
_ _
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
|