This is an excellent control! Thank you so much for developing this! This has more functionality than the expensive controls out there, so it is much appreciated.
I have a few questions that are probably easy to answer, but I am new to VB.Net. First, there was a post earlier that asked for the control to collapse when you click off of it. I am trying to add the hide command in the Public Methods region of ExCb.vb file, but doesn't seem to recognize it. How do I access the .vb file when it's not listed in my project?
Also, when running the compiled version, I am getting an error message. Below is a link to the snapshot of the error.
First of all, thank you very much for your words about the control.
1) It is very strange the file not be listed in the project....
When you open the Solution (ExCB_Test.sln) or even the Project (ExCB.vbproj), the file (ExCB.vb) appears under project ExCB, in the Solution Explorer window...
Anyway, you can always open the file (... \ ExCB \ ExCB.vb) from the Windows Explorer.
Just locate #Region "Public Methods" inside #Region "Class ExCB" and insert the code at the beginning, like this:
#Region "Public Methods"
'Public Sub .....
PublicSub Clear(OptionalByVal AlsoColumns AsBoolean = False)
2) The message ("The system cannot find the file specified") is instructive. The file ExCB.dll must be placed in the Application.StartupPath (the folder where the application executable is).
OK thanks for the info. The CloseUp routine started working out of the blue. I'm not sure what changed, but I've learned not to question these things . Also, copying the dll to the location of the .exe worked. I did not know that was required.
I have just one more question. Is it possible to have the scroll button on the mouse move the list up or down?
Thanks again for your help and for developing this fabulous control!
No, the mouse wheel does not do anything. The Page Up/Down keys do not move the list either. I can only click the up/down arrows on the vertical scroll bar, or click and drag the scroll cursor block. I have tried toggling the AutoScroll property, but it doesn't change anything.
It's really strange... I've just download the projects, like any other visitor, loaded the VS2012 version, ran it, and the mouse wheel works fine, of course, with the mouse pointer over any part of the list.
About PageUp and PageDown, look at "Some suggestions" from Member 10630008, below.
That is strange indeed. I re-downloaded the projects, loaded the VS2012 version, and the example project won't scroll with the mouse wheel either. The wheel works on everything else, like Chrome, etc. That really is weird! One other thing I thought of, does this have the capability to autocomplete? Or at least type the first few letters and it auto-scrolls to that section? Also, do you have a PayPal account? I would gladly donate some money for this control as well as all your help. Thanks
1) Mouse Wheel - Please, send an email to email@example.com, so I can send you a program that tests the mouse wheel scrolling, in several controls: ExCB, ListView, ComboBox, ListBox and DataGridView.
2) AutoComplete - Not implemented, however it can be. But, as one needs to change code in several parts, it would be too extensive to present the solution in a post like this. So, I can send you a solution, also by mail.
3) I'm touched by your willingness to make a donation, but in the context of CodeProject my work is for free, so I kindly refuse. I only get money when I work specifically/exclusively for someone. However, if you cherish the Control, I'll be very happy if you upvote the Article. Thanks.
Thank you for all your work on this control! I used these extensively in Access and didn't want to make forms without it ... I do have a question and a possible issue.
I would like the list to close up when a user clicks off the list or control, or tabs out of the control. Is there a way to do that? Perhaps in the Leave event?
I am using your control on a page that is part of a tab control. When I set the MaxRowsDisp = 20, the list goes below the bottom of the form. Normally, I believe that if the Excb control is on the form itself (not on a Tab control), the list will drop down and be visible below the form. But when it is on a page of a tab control (the tab control goes to the bottom of the form), it behaves a little oddly in that the list stops being visible at the bottom of the form. When I scroll down using a mouse the scrolling action works even below the bottom of the form where I can't see the list! So while I can operate the list below the form, I can't see it there.
I set my MaxRowsDisp to 10, so I'm OK with this one. But on another form when I'm using a Tab control it may be best to place the Excb nearer the bottom of the form, and I might only get a few rows to be visible.
Thank you. Happy because the control is useful to someone.
1) The Leave event will fire only if you click another control, better will be to use also the Form's MouseClick event.
First, in ExCB.vb, region "Public Methods", insert this Sub:
Then, call it from:
PrivateSub Excb1_Leave(sender AsObject, e As EventArgs) Handles Excb1.Leave
PrivateSub Form1_MouseClick(sender AsObject, e As MouseEventArgs) HandlesMe.MouseClick
2) The ExCB control will never drop down below the parent Form or TabControl, but the List Height can be adjusted when the Form is resized.
For the Form, see Last Updates 5. 2. - AdjustListHeight
When the ExCB is inside a TabControl, if the TabControl is anchored (Top and Bottom) to the Form, a slightly different Sub can be inserted in ExCB.vb: