Important alert: (current site time 7/16/2013 2:43:32 AM EDT)
 

winzip icon

LynxComboBox v1.30 (owner-drawn Multi-Column ComboBox with ListView Style)

Email
Submitted on: 11/11/2006 3:27:53 PM
By: Richard Mewett 
Level: Intermediate
User Rating: By 77 Users
Compatibility: VB 6.0
Views: 48678
author picture
(About the author)
 
     - Updated in response to feedback 11 Nov 06 - Owner-drawn ComboBox that provides multiple columns in a ListView (in Report View) style display. Features include Item CheckBoxes, Item Images, dynamic Column Sorting/Resizing, Item Formatting (ForeColor, FontBold etc), datatype aware sorts, custom sorts and auto-scrolling (when mouse dragged out of control). Supports native XP Themes & emulation of XP/Office XP Themes. Feedback welcome (votes appreciated!) Credits in source for PSC authors who have helped make this possible. NOTE: This control has partial Unicode Support (Editable Mode does not support Unicode Data Entry due to VB TextBox) UPDATE: This Control was formerly called ComboView - renamed for consistency with my other controls.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 11 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
7/1/2005 8:00:02 AMMatthew R. Usner

Wow, this looks familiar... :-) It's a great control! As you know I have an app that this will work perfectly for. Thanks!
(If this comment was disrespectful, please report it.)

 
7/1/2005 8:04:51 AMRichard Mewett

Cheers Matt! Your suggestions/feature requests were invaluable in getting the "feel" of this control right. Well done on the contest win :)
(If this comment was disrespectful, please report it.)

 
7/1/2005 8:21:00 AMJim Jose

Hey Ricahrd,

Well done :-)), you got 5 planets. Nice work on multicolumns.

What about column resizing...
(If this comment was disrespectful, please report it.)

 
7/1/2005 8:30:02 AMRichard Mewett

Jim - I knew this would come up!! Thanks for the feedback & vote & I'll see about the resizing...
(If this comment was disrespectful, please report it.)

 
7/1/2005 9:31:31 AMPaul Caton

Excellent!!!

I'm loving these single file, compiled in, UserControls.
(If this comment was disrespectful, please report it.)

 
7/1/2005 11:14:59 AMDean Camera

Excellent as always, Richard. 5 globes.
(If this comment was disrespectful, please report it.)

 
7/1/2005 12:59:00 PMEvilgenious

A Perfect control for my "GEN DB TOOL". Thanks Mewett. <*****>
(If this comment was disrespectful, please report it.)

 
7/1/2005 1:01:17 PMPhantom Man

Well Done Richard

An Outstanding Single File Control.

(If this comment was disrespectful, please report it.)

 
7/1/2005 1:32:11 PMRichard Mewett

Paul,
Where would we control creators be without your subclasser (full credits to you in the Control)!
(If this comment was disrespectful, please report it.)

 
7/1/2005 2:08:23 PMKnoton

Thank you very much for sharing such an useful control. Just love it :-)
(If this comment was disrespectful, please report it.)

 
7/1/2005 2:32:47 PMjeremyxtz

Great stuff - can see some small cosmetic improvements - prettier scroll bars maybe, redrawing the icon on top of the selection instead of just drawing over the icon, not starting the selection dead on the left edge of the first letter...
(If this comment was disrespectful, please report it.)

 
7/1/2005 3:02:38 PMRuturaaj

This control is great ... just wanted to use it in my application for Options and found one thing which, if implemented, will make this control unique.

There is an option for Radio button (option button) as well. If you allow grouping, then I can utilize same control for different settings.

Currently I'm using vbAccelerator's Drop Down Form control in which I drop down a picbox. Due to non=grouping, I can select only one Option from Option List ... I know this is expected when you are using a List ... but still Multi-Select for Option Buttons under different groups will be great.

I don't know how much useful this feature-request will be ... just thought it because I wanted something like that in my project ...

Thanks for sharing such a nice project with us !
(If this comment was disrespectful, please report it.)

 
7/1/2005 3:08:28 PMRuturaaj

Ok. I read my comment. I think I need to make it little clear regarding grouping. By Grouping, I mean is ... we group option buttons in frame and then one option button can be selected from each group (in frame or any other container). That thing, I needed in this control to be possible. Here, the control gives a list of Option buttons. Because of that, I can select only one.

Now, I think you will get what I mean ... well, may be ... !!!

Doesn't matter ... this code deserves 5 stars !
(If this comment was disrespectful, please report it.)

 
7/1/2005 4:50:30 PMCarles P.V.

Great! All controls should be single module: just 'drag and drop' and ready to use. Paul has helped to achieve this (and achieve it easily). One minor improvement regarding to scrollbar background (VB's bug): just process WM_CTLCOLORSCROLLBAR message (MSG_BEFORE) in your picList window. Just handle it.
(If this comment was disrespectful, please report it.)

 
7/1/2005 5:37:55 PMRichard Mewett

Wow! Can't believe the amount of feedback I'm getting - and the votes are pretty nice to ;) Cheers guys...
(If this comment was disrespectful, please report it.)

 
7/1/2005 6:32:08 PMHeriberto Mantilla Santamaria

Hi Richard Mewett, this control is excellent.

I only have a restlessness, the control "cboUC" of the project, when I make click in an item another item of the list it's selected and I don't understand the reason.

Allow me to give you my 5 cents.

Note: Thanks to have me in mind in the credits, it's a honor for me.
(If this comment was disrespectful, please report it.)

 
7/2/2005 3:34:53 PMDavid M Rice

Kicks ass!
(If this comment was disrespectful, please report it.)

 
7/2/2005 4:12:04 PMe-roq

Woo Hoo! 5 globes. :)
(If this comment was disrespectful, please report it.)

 
7/2/2005 9:46:36 PMFred.cpp

What a nice control.
As Paul, Carles, and Gary said, Single File controls are alway wellcome.
Comments: the Scrollbar WM_CTLCOLORSCROLLBAR message and grouping features. Anyway, gets 5 from me
(If this comment was disrespectful, please report it.)

 
7/2/2005 9:47:33 PMFred.cpp

p.s. Heriberto, have you seen this before?:)
(If this comment was disrespectful, please report it.)

 
7/2/2005 11:30:11 PMHeriberto Mantilla Santamaria

Yeah fred, I have seen it before.
(If this comment was disrespectful, please report it.)

 
7/3/2005 1:02:29 AMMark F

Beautiful! - 5 stars!
(If this comment was disrespectful, please report it.)

 
7/3/2005 4:01:55 AMKelly S. Ethridge

Great job, Richard. I love expanding my collection of quality controls.
(If this comment was disrespectful, please report it.)

 
7/3/2005 8:55:23 AMenmity

a generic scrollbar that is more good looking? ;)
(If this comment was disrespectful, please report it.)

 
7/3/2005 1:54:03 PMEvilgenious

Hey Richard. congrats. Its getting successfull. really cheers.
(If this comment was disrespectful, please report it.)

 
7/4/2005 12:55:31 AMFred.cpp

Waithing for updates:D I'm falling In love with the control
(If this comment was disrespectful, please report it.)

 
7/4/2005 9:15:24 AMRichard Mewett

Thanks Fred. I've uploaded an update which allows the columns to be resized with the mouse while the Dropdown is open (ColumnResize Property)
(If this comment was disrespectful, please report it.)

 
7/4/2005 9:32:37 AMRichard Mewett

Carles, thanks for the scroll bar tip. Included in update.
(If this comment was disrespectful, please report it.)

 
7/5/2005 5:33:07 AMCris Friolo

Very nice thx for sharing man
(If this comment was disrespectful, please report it.)

 
7/5/2005 8:32:58 AMMatthew R. Usner

"there are some problems with events" Now THERE'S a helpful comment!
(If this comment was disrespectful, please report it.)

 
7/5/2005 9:21:24 AM[])utch[]v[]aster

something I noticed, setting the drop-down font to bold yields no bold drop-downs.
(If this comment was disrespectful, please report it.)

 
7/5/2005 11:22:01 AMAnders Lyman

Thanks for the credit on the mouse wheel, it isn't my code (entirely) but I don't recall where I got it anyway...
5 from me.
(If this comment was disrespectful, please report it.)

 
7/5/2005 12:45:55 PMRichard Mewett

[])utch[]v[]aster, Bold Font attribute is a property per Item in list so each rendered Item can be different.
(If this comment was disrespectful, please report it.)

 
7/5/2005 12:54:37 PMRichard Mewett

Thanks to Phantom Man & ])utch[]v[]aster for informing me of the two problems fixed in udate above.
(If this comment was disrespectful, please report it.)

 
7/5/2005 1:16:28 PMRiccardo Cohen

Richard Mewett, wooww this rockzzz. % globes from me. Keep up de good work!!!!
One Q: Do you know, why the two comboboxes don't show what is selected in the list?
(If this comment was disrespectful, please report it.)

 
7/6/2005 5:31:31 AMDavid K Richmond

Richard, a quality submission that gets my vote. =[8-)
(If this comment was disrespectful, please report it.)

 
7/6/2005 1:42:01 PMMatthew R. Usner

Looks like a "Top Gun" war between you and Fred.cpp this month... I predict millions of civilian casualties. :-)
(If this comment was disrespectful, please report it.)

 
7/6/2005 3:47:09 PMFred.cpp

I still vote for this control, maybe I'm tired of look at the isButton's code =)
This one Is really nice.
p.s. Will you implement Windows Theme support?
(If this comment was disrespectful, please report it.)

 
7/6/2005 4:27:31 PMRichard Mewett

Thanks very much Fred. I have thought about Themes so perhaps thats next on the list!
(If this comment was disrespectful, please report it.)

 
7/8/2005 5:19:03 AMRichard Mewett

Thanks to everyone who has left feedback and/or voted!
(If this comment was disrespectful, please report it.)

 
7/8/2005 6:27:25 AMRichard Mewett

Phantom Man - your concise bug reports have been much appreciated. Let's hope there are not too many more to find :)
(If this comment was disrespectful, please report it.)

 
7/9/2005 5:11:36 AMD. Rijmenants

You know what more i would like... euh... nothing more, this is just all i want ;-))) Tnaks for sharing!
(If this comment was disrespectful, please report it.)

 
7/9/2005 1:53:54 PMFred.cpp

Nice update. The control seems to be going to the MultiStyle Family of usercontrols? :) (That would be really nice)
(If this comment was disrespectful, please report it.)

 
7/10/2005 10:46:21 AMHeriberto Mantilla Santamaria

Hi Richard Mewett, see the SMGrid This it can serve you as guide for the part of the themes.
(If this comment was disrespectful, please report it.)

 
7/10/2005 2:46:20 PMLibor Blaheta

Hi, could you add Unicode support, thanks.
(If this comment was disrespectful, please report it.)

 
7/11/2005 5:47:40 PMJeff Mayes

Great control, Richard. I will vote 5, but I did fond one little error. If you have the columnsort set to true and you click on a header, it fires the click event as if you had selected an item. Any way to prevent this? To put it another way, I want to be able to sort using the column headers without firing the click event, where I typically presume that the user has made a selection.
(If this comment was disrespectful, please report it.)

 
7/13/2005 6:27:47 AMRichard Mewett

Jeff, the Click event exists for standard VB control functionality. You want to use the ClickItem event in your case. This only fires when clicking on an Item - not when clicking in the Header. It also gives you information about the mouse button clicked etc.
(If this comment was disrespectful, please report it.)

 
7/13/2005 11:50:54 AMJeff Mayes

Thank you Richard.
(If this comment was disrespectful, please report it.)

 
7/15/2005 12:51:08 AMAgung Nugroho

I love this.. single file usercontrol instead of ocx.

Thanks Richie, it's a great control.
(If this comment was disrespectful, please report it.)

 
7/15/2005 7:16:30 AMRichard Mewett

This update includes changes to the use of the DrawText API. A wrapper now adds Unicode support on NT/2000/XP (the control may require further changes for unicode support) & I have changed my DrawElipsis code to a simpler method which appears top be consistent between 98/NT. My thanks to Dana Seaman who emailed me samples on this. Read his unicode article!
(If this comment was disrespectful, please report it.)

 
7/15/2005 5:10:56 PMJeff Mayes

2 quick questions, Richard.... Is there a way to make the control dropdown programattically? Or to have it always open in IDE and runtime?
(If this comment was disrespectful, please report it.)

 
7/18/2005 1:13:44 PMTom Level

great control! 5 globes from me!
one request i'd have - would be nice if u could switch it to listview-mode instead of combo-box by default.
thx,
tom
(If this comment was disrespectful, please report it.)

 
7/18/2005 1:33:53 PMRichard Mewett

Tom, thats a valid request but I feel the subtle differences between a "popup" list and an "always up" list mean that a seperate control is a better solution. I don't want to bloat this control with too many logic switches :) Thanks for your feedback.
(If this comment was disrespectful, please report it.)

 
7/18/2005 5:12:27 PMJeff Mayes

Do you have plans for a multi-column listbox then?
(If this comment was disrespectful, please report it.)

 
7/19/2005 11:45:53 AMJeff Mayes

I found a way, Richard. By the way, you may want to add the following line to the UserControl_Show sub:

vscItem.LargeChange = mPageScrollItems

This will allow the scrollbar to act correctly for large changes.

(If this comment was disrespectful, please report it.)

 
7/20/2005 2:07:24 AMHugo

Really great stuff!!
One comment: I had a "Dr. Watson" problem on NT4 (XP went fine). The cause of this problem was in Sub DrawText. The call with StrPtr caused a memory read error, crashing VB.
I noticed that just using lpString went fine on NT4 and XP. I believe that VB always uses pointers when passing string variables to the Windows API, so I think you can leave out the OS check and always use lpString instead of StrPtr(lpString).

(If this comment was disrespectful, please report it.)

 
7/28/2005 3:42:43 PMLibor Blaheta

Thanks for the Unicode support.
(If this comment was disrespectful, please report it.)

 
7/31/2005 3:43:14 PMHeriberto Mantilla Santamaria

Hi again Richard.

I have noticed that the arrows (up and down) they don't work correctly.
(If this comment was disrespectful, please report it.)

 
8/1/2005 8:47:47 AMRichard Mewett

My thanks to everyone who has left feedback and/or voted. :D
(If this comment was disrespectful, please report it.)

 
8/1/2005 9:37:30 AMtheint

Amazing control! 5 Stars for you!
(If this comment was disrespectful, please report it.)

 
8/3/2005 2:51:24 PMFred.cpp

Congratulations Richard :D
a deserved coding contest Winner :D
(If this comment was disrespectful, please report it.)

 
8/3/2005 10:23:29 PMMatthew R. Usner

Congrats Richard. This definitely deserve COTM.
(If this comment was disrespectful, please report it.)

 
8/7/2005 2:34:37 AMMichael Wandel

Absolutely awsome, i love this thingy :)
but any idea of changing it to a "simple" listbox with header function? I would appreciate having a solution for this.
(If this comment was disrespectful, please report it.)

 
8/7/2005 5:16:57 AMRichard Mewett

Look out for a ListView style control soon!
(If this comment was disrespectful, please report it.)

 
8/9/2005 6:54:55 AMVÕ ANH TUẤN

i had download it to my pc , it's very good
(If this comment was disrespectful, please report it.)

 
8/13/2005 6:46:42 PM

Awsome, I replaced all comboboxes in my project with this one !
I love it!
(If this comment was disrespectful, please report it.)

 
8/14/2005 2:24:20 AMmeem

GOO JOB!
5 gloves from me.
thanks for sharing it with us.
(If this comment was disrespectful, please report it.)

 
8/16/2005 8:36:00 PMJose

Matt:
Is there a Way to use all the ComboView options but being able to use it as a regular ComboBox. I mean being able to change the value of the text box of the ComboBox like the Regular VB6 control Box???. I need to be able to add values at run time by putting new values in the cbo.text????
(If this comment was disrespectful, please report it.)

 
8/22/2005 6:41:01 PMRichard Mewett

The last 1500+ hits (views since end of July) have produced only 4 comments! Please leave your feedback good or bad - it's how open-source projects get better!
(If this comment was disrespectful, please report it.)

 
8/22/2005 10:05:37 PMOption Explicit

Laundry is the fifth dimension!! ...um...um... th' washing machine is a black hole and the pink socks are bus drivers who just fell in!!

(If this comment was disrespectful, please report it.)

 
8/23/2005 4:49:35 AMRichard Mewett

I'd love to see your code Option Explicit :) ...
(If this comment was disrespectful, please report it.)

 
8/25/2005 2:29:24 AMJacky Wong

Super cool~~~~~!
It is be perfect if the "auto complete" will have some signal when the input text is not in the list.
(If this comment was disrespectful, please report it.)

 
8/30/2005 5:46:43 AMRichard Mewett

OK, since I've had a few emails recently on ComboView tweaks I hope to upload a new version soon... (time permitting!)
(If this comment was disrespectful, please report it.)

 
10/9/2005 10:08:10 AMhg

Great work!
(If this comment was disrespectful, please report it.)

 
10/13/2005 9:32:46 AMRichard Mewett

Replaced all Integer List variables with Longs and converted to API ScrollBars. This allows the control to support >32767 Items in a list.
(If this comment was disrespectful, please report it.)

 
11/17/2005 9:11:34 AMayman metwally

Excellent
(If this comment was disrespectful, please report it.)

 
1/10/2006 7:44:36 AMTerriTop

Wow Richard, just found this gem! Can't believe I missed this first go round....Thansk for sharing this excellent control! TerriTop
(If this comment was disrespectful, please report it.)

 
1/26/2006 8:02:56 AMRichard Mewett

Thanks TerriTop - finally got around to updating and have patched the flicker on the scrollbars when resizing a column as you suggested :)
(If this comment was disrespectful, please report it.)

 
1/26/2006 1:36:00 PMHeriberto Mantilla Santamaria

Nice update Richard, it hurts I can't vote another time.
(If this comment was disrespectful, please report it.)

 
1/26/2006 1:36:55 PMOption Explicit

Actually, what I'd like is a little toy spaceship!
(If this comment was disrespectful, please report it.)

 
1/27/2006 1:11:43 AM

CAN U PLS. TELL ME THAT IF I WANT TO USE THIS COMBO AS SIMPLE COMBO TYPE WITH THIS FEATURE CAN IT POSSIBLE
(If this comment was disrespectful, please report it.)

 
1/27/2006 1:27:43 AM

SHALL WE USE ALL FACILITY LIKE THIS WITH THE SIMPLE COMBO BOX SETTING PLS. MAIL ME
(If this comment was disrespectful, please report it.)

 
1/27/2006 11:33:43 AMalex

Nice work, thanks for sharing.

Could you please let me know if there is a way to pop up the multi column list by pressing Alt-DownArrow? At least this is not working on my computer, but I think it would be a great feature to quickly browse trough the multi column list without using the mouse.

Thanks!
(If this comment was disrespectful, please report it.)

 
1/27/2006 11:58:08 AMRichard Mewett

Thanks for your comments Alex. You can press F4 to open/close the pop-up list. I had never tried the Alt+Arrow combination but since I now now a normal ComboBox uses that combination I will add it.
(If this comment was disrespectful, please report it.)

 
1/27/2006 12:54:22 PMalex

Strange, I never used F4 on a ComboBox. Knowing to look for F4 in your code it was easy make the few changes. This is a great control!
I registered at PSC just to vote for you. Take five :).

(If this comment was disrespectful, please report it.)

 
1/27/2006 1:09:33 PMalex

Sorry, I don't want to spam, but I think I found a bug in your current version:
1. Open the multi column ComboView with F4
2. Scroll down with the down arrow key. Keep the key pressed.
3. Bug: the view is not updated while scrolling through the entries. There is no indication of the current position. You have to press the up arrow again to update the display.

Alex
(If this comment was disrespectful, please report it.)

 
1/27/2006 2:04:03 PMRichard Mewett

Alex, no problem! I appreciate the time you have taken in informing me of the problem. PSC users like yourself are invaluable in making submissions better. I will fix all issues and repost later. Thankyou for the vote :)
(If this comment was disrespectful, please report it.)

 
1/27/2006 6:07:01 PMRandy Gomez

Congratulations on a fine piece of work! I concur with Alex about the scrolling problem, but otherwise wirjs great!
(If this comment was disrespectful, please report it.)

 
1/27/2006 6:59:14 PMRichard Mewett

The scroll problem is a hangover from the switch to API scroll bars. The ScrollBar Scroll Event used to Fire a redraw so some navigation actions did not call a Redraw directly to avoid double repaints. I have fixed but will not repost until I have searched for others!
(If this comment was disrespectful, please report it.)

 
1/28/2006 10:08:50 AMHG

Richard this is one of the most useful controls I've ever seen.
HG
(If this comment was disrespectful, please report it.)

 
1/29/2006 3:42:32 AMRichard Mewett

Randy & HG - Thanks very much!
(If this comment was disrespectful, please report it.)

 
1/30/2006 4:58:31 AMRichard Mewett

Posted v1.0.4 which fixes the keyboard scroll redraw bug that appeared after the API scrollbars were implemented. Added Home/End keys to move to top/bottom of list. Categorized the controls Properties. Improved the demo project to show more of the properties.
(If this comment was disrespectful, please report it.)

 
1/30/2006 7:32:30 AMmichael doering

Hi Richard,
very very Excellent control.
thanks for share it.
single file usercontrol solution is very cool :-)
(If this comment was disrespectful, please report it.)

 
1/30/2006 10:25:23 AMmaghick

How did I miss this on the first release??? This will be perfect in my Access-like editable data grid with linked lookups. I know it's too late, but 5 bagels from me!
(If this comment was disrespectful, please report it.)

 
1/30/2006 11:13:38 AMRichard Mewett

Thanks guys for all the feedback - it's great when people take the time to comment and I really apreciate it! That even goes for bug reports ;) Can't deny votes are pretty nice as well :)
(If this comment was disrespectful, please report it.)

 
2/3/2006 4:28:59 AMRichard Mewett

I have an updated version which adds some extra Edit functionality - makes it easy to update an Item in the list when you change the text, which can get quite involved with a standard ComboBox! Also fixes a bug with AutoComplete which prevented Edits from persisting after Focus shift. I will not post for a while because I don't want this to keep appearing the top of the submission list - it gets embarrassing after a couple of updates. Makes it look like you are an attention seeker :(
(If this comment was disrespectful, please report it.)

 
2/18/2006 5:08:37 AMGuy DETIENNE

I've never seen a such perfect control.
Thanks !
(If this comment was disrespectful, please report it.)

 
2/18/2006 5:31:34 AMMasino Sinaga

Very useful. 5 globes from me, and thank you very much for sharing this.
(If this comment was disrespectful, please report it.)

 
2/28/2006 2:03:28 PMCarubini

I've never seen a such perfect control.
Thanks ! I hope that you can growht much more ;)

(If this comment was disrespectful, please report it.)

 
3/2/2006 8:12:28 AMOption Explicit

"I've never seen such a perfect control"..."I registered at PSC just to vote for you"...

Just how much are you paying these people Richard? ;) j/k
(If this comment was disrespectful, please report it.)

 
3/2/2006 8:42:53 AMRichard Mewett

^ It's getting pretty grim. I don't have many gifts left..... :D
(If this comment was disrespectful, please report it.)

 
3/11/2006 10:58:07 AMalex

How to get along with Richard:

1. Vote **.
2. Wait until he contacts you.
3. Wait some more until the Lowland Single Malt arrives safely at your house.
4. Vote *****

Makes everybody happy and works every time :).
(If this comment was disrespectful, please report it.)

 
3/11/2006 4:02:38 PMOption Explicit

Thanks Alex, now I know how to deal with Richard the next time he submits. Globe extortion... excellent. :D
(If this comment was disrespectful, please report it.)

 
3/13/2006 11:30:10 AMSashir

Estimado Richard,

Esto es lo que hace tiempo estaba buscando. Buen trabajo !!!

Saludos.
(If this comment was disrespectful, please report it.)

 
3/23/2006 3:23:03 AMtirupathi

hi,
how can i use controls hwnd method.
i have an editable grid which expects
syntax in this way--
mycontrol.customehwnd=rmcomboview1.hwnd

but the rmcomboview is dissappearing from any idea
(If this comment was disrespectful, please report it.)

 
5/5/2006 10:17:38 AMJimmy

It's a excellent control, but when i put it to a form as MDIChild, then resize form, it raise a memory error.
Thanks.
(If this comment was disrespectful, please report it.)

 
5/6/2006 10:24:54 AMRichard Mewett

Jimmy, thank you for you comments. Unfortunately I don't have a problem with MDI forms so I cannot fix anything! Does anyone else get this problem?
(If this comment was disrespectful, please report it.)

 
5/22/2006 6:27:21 PMOption Explicit

There are WAY too many votes for this. Richard, don't you know that control makers only contribute to a culture that believes how a program looks is more important than how it performs? You should be ashamed of yourself.

Sincerely, Princess Steppo ;o) ;o)

Seriously, nice to see this break into the top 100 all time on PSC, it's very deserving of all the 5-globe votes.
(If this comment was disrespectful, please report it.)

 
5/29/2006 3:11:20 AMM. Al Radi

unfortunately, In VB6 an error will be raised on form unload if the size of the window (Only MDI Child not in Modal) was changed. It will close the application!!!
(If this comment was disrespectful, please report it.)

 
6/6/2006 2:17:38 PMRichard Mewett

Thanks to everyone who has voted for this control! For the people who requested I make an "always up" version of this control, I hope I know have another UC that may be suitable - LynxGrid. I intend to upload an updated version of ComboView with support for XP themes soon.
(If this comment was disrespectful, please report it.)

 
6/21/2006 1:51:44 PMDani

Thanks for providing this excellent control. I have been using it for a few days and my feedback is as follows:

If you clear a combo and re-load it and the number of items is less than the property: DropDownItemsVisible, the drop down list sometimes displays a blank entry at the end of the list and the first item is not visible. As a test I updated the ShowItems (list items section) as follows and it seems to have resolved the problem:

If mItemCount < mDropDownItemsVisible
Then
c = 0
Else
c = SBValue(efsvertical)
End If

For lItem = c To (SBValue(efsvertical) + mDropDownItemsVisible) – 1 etc

I hope it helps
(If this comment was disrespectful, please report it.)

 
6/21/2006 1:53:10 PMDani

Comments Continued:

If you call a procedure from SelectionChanged() the drop down does not always close.

I have 2 projects using this control. If I try to share a form that uses the control between the two projects when I add the form to the second project, I get the following error message:

....RMComboView of control [combo] was not a loaded control class....
(If this comment was disrespectful, please report it.)

 
6/21/2006 3:37:55 PMRichard Mewett

Hi Dani, thanks for the feedback and your vote! The problem with the form you share between two projects is caused by the syntax that VB6 uses to reference UserControls. For example, when you place a PictureBox on a form and save the Project, VB will store a reference of VB.PictureBox in the Form. However, VB uses the syntax of [ProjectName].[Controlname] for referencing UserControls. This means that when you use the Form in your 2nd project the reference fails because [ProjectName] cannot be resolved. I will look at the bug syou mentioned and hopefully post an update soon. :)
(If this comment was disrespectful, please report it.)

 
7/6/2006 2:16:31 PMGiovanni Rojas Ortiz

In VB6 an error will be raised on form unload Only MDI Child. It will close the application!!!
(If this comment was disrespectful, please report it.)

 
8/4/2006 11:45:42 AMRichard Mewett

Updated with Themes & behaviour tweaks. This version is significantly more stable in the IDE than the previous one since I changed the subclass_stop sequence in the Terminate Event. It used to crash when using the STOP button if the drop-down list was displayed.
(If this comment was disrespectful, please report it.)

 
8/4/2006 8:58:03 PMZhu JinYong

When drop-down list is displaying,some strange thing (looks like a listview head)is showing up in txtEdit.
(If this comment was disrespectful, please report it.)

 
8/5/2006 1:59:36 PMHeriberto Mantilla Santamaria

I found a bug, check out the snap

http://fotosupload.com/mostrar.php?imagen=FuD4604_bug.gif
(If this comment was disrespectful, please report it.)

 
10/27/2006 4:55:20 PMGiovanni Rojas Ortiz

Richard, Heriberto Change in function Draw them the line lResult = DrawThemeBackground(hTheme, Usercontrol.hdc, iPart, iState, rtRect, rtRect) for lResult = DrawThemeBackground(hTheme, picList.hdc, iPart, iState, rtRect, rtRect) and ok draw
(If this comment was disrespectful, please report it.)

 
10/27/2006 6:53:19 PMGiovanni Rojas Ortiz

The bug with MDIChild continue, only max the MDIChild and view.
(If this comment was disrespectful, please report it.)

 
11/12/2006 4:02:17 AMRichard Mewett

Thanks Giovanni for spotting the XP Theme bug (and to all the others who have provided recent feedback about issues with the control). :)
(If this comment was disrespectful, please report it.)

 
11/12/2006 9:50:09 PMTuanHai

In "BorderStyle = Flat" mode, the dropdown button should be Flat button (now only the textbox and dropdown listbox got effect). In Windows XP, OfficeXP Theme, the dropdown button is not the same as in Windows XP, OfficeXP. Please update this great control.
Many thanks!
(If this comment was disrespectful, please report it.)

 
1/25/2007 2:52:30 PMRedNight

the only problem I've seen is, if a form using the vbalSGrid6.ocx is loaded at the same time, the control crashes on form close, so I used a timer so step around that for now. other than that, it's great
(If this comment was disrespectful, please report it.)

 
3/5/2008 12:44:29 AMBen Ng

I'd like to thank you the author of this code for his contribution to the VB community on planet source code.

I think he may be busy with .NET projects. I appreciate if someone can help me.

I had no problems with non-MDI child forms for this control. But the application crashed when using this control with MDI-child forms when I added more than one multicolumn combobox on the same MDI child form (if I use one combobox, I have no problem).

Anybody has the same problem with me.

Please help me as I am very new to the control creation. I appreciate your help.

Thank you.

(If this comment was disrespectful, please report it.)

 
5/20/2008 1:59:10 AMwangchao

Problem:
I had no problems with non-MDI child forms for this control. But the application crashed when using this control with MDI-child forms when I added more than one multicolumn combobox on the same MDI child form (if I use one combobox, I have no problem).

Please help me. Thanks!
(If this comment was disrespectful, please report it.)

 
8/20/2008 4:16:32 PMJorge Cossio

Please Richard do not forget about us and the error when unloading a child form that has a lynxCombobox. The app crashes. Please gives us some light on this. Thanks
(If this comment was disrespectful, please report it.)

 
9/30/2008 7:15:52 AMTayab

Its a very good effort, I think that it should be enhanced more and its interface should be kept near to standard vb6 combo box.
(If this comment was disrespectful, please report it.)

 
9/30/2008 1:05:17 PMFranco Zapata

It's excellent work my friend, Just I need it
Good luck Richard!
(If this comment was disrespectful, please report it.)

 
10/1/2008 7:43:01 PMFranco Zapata

Hi Richard,
I got to solve problem: when I have two controls in MDI child's form : cbo_ot(0) and cbo_ot(1), then I try close this window and crush vb project.
SOLUTION:
.... in form
Private Sub Form_Unload(Cancel As Integer)
CloseWindowChild(Me.hWnd)
End Sub
.... in module:
Private Declare Function DestroyWindow Lib "user32" (ByVal hWnd As Long) As Long

Public Function CloseWindowChild(ByRef hWnd As Long) As Boolean
Dim retval As Long
retval = DestroyWindow(hWnd)
If retval <> 0 Then
CloseWindowChild = True
End If
End Function

I hope this is your solution.
Franco.
(If this comment was disrespectful, please report it.)

 
11/17/2008 7:28:21 AMsmartstar

Hi,
Great Control, but has a Great Problem with it.

It does not work if you are using LynxGrid in your project along with LynxComboBox.

If you will put LynxGrid on a form and MORE THEN 1 LynxComboBox. While unloading the form, program crashes, if you are in IDE, it will crash too.

I tried to solve it, but can't...

ANY GOOD PROGRAMMER THERE, PLEASE SOLVE THIS ISSUE.

Thanks & regards,

my email id is: smartstar@coolgoose.com

...
(If this comment was disrespectful, please report it.)

 
11/20/2008 8:32:42 AMFranco Zapata

Hi smartstar,

I have same problem,
my only solution is hide form (instead unload form).
It's simple and quick.
I try to find a solution, but not find it.
Regards
Franco.
(If this comment was disrespectful, please report it.)

 
11/20/2008 8:53:29 AMFranco Zapata

my solution:

instead call frmChild1.show
to reload form from frmCalltoChild1 form
I use :
'--- to display form: frmCalltoChild1's code ----
frmChild1.reload_form
frmChild1.ZOrder 0


'-----------------
then in frmChild1's code --------------

Public Sub reload_form(Optional ByVal PROYECT_ID As Long, Optional ...)
...
DoEvents
Show
DoEvents
End Sub

Sub Form_load()
'in blank
End Sub

Private Sub Form_Unload(Cancel As Integer)
If EXITPROGRAM = False Then
Cancel = 1
If isloadForm(frmCalltoChild1) Then
frmCalltoChild1.restore
End If
Me.Visible = False
Else
CloseWindowChild (frmChild1)
Unload frmMDI
End If
End Sub

Public Function isloadForm(find_ As Form) As Boolean
isloadForm= False
For i = VB.Forms.Count - 1 To 0 Step -1
If VB.Forms(i) Is busca_ Then
isloadForm = True
Exit Function
End If
Next i

End Function


I hope answer your question

Regards
Franco

(If this comment was disrespectful, please report it.)

 
12/16/2008 3:53:10 AMsmartstar

Dear Friends,

I Adore this Control, it is great but have so many problems, it makes IDE Crash on design time, Crashes project on Form Unload if used more than one on form. But i love the look and feel of it as well as functionality. I have used it havily in one of my project. I think problems with this control can not be resolved. IF ANY BODY CAN LET ME KNOW ABOUT ANY COMMERCIAL CONTROL WHICH IS EQUALLY GOOD, SO I CAN BUY AND USE IN MY PROJECT. PLEASE ADVICE.

Thanks & Regards,

(If this comment was disrespectful, please report it.)

 
1/7/2009 8:27:21 PMMasino Sinaga

I made some enhancements to this LynxComboBox:
- Changed Private to Public for SearchCode function in order could be used for validating the selected text.
- Added 4 new functions: FindFirstText, FindNextText, FindPrevText, and FindLastText for searching text in the certain column.
- Fixed Locked property; Before: KeyPress/KeyDown still work and item could choosen and could be selected when Locked = True, After: Now it has been fixed by truly locking.
- Added new feature to bind value on certain column in drop-down list to another controls. This feature can get value from certain column in drop-down list and automatically filled-in on another control such as TextBox.
- Added function ResetValue to reset value in LynxComboBox and all controls that binds to LynxComboBox. Similiar to Reset button in HTML.

Get it from: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=71617&lngWId=1
Best
regards,
Masino Sinaga
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.