Results 1 to 12 of 12

Thread: [RESOLVED] Lynx ComboBox 2

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Roodepoort, South Africa
    Posts
    459

    Resolved [RESOLVED] Lynx ComboBox 2

    Does anybody here have experience with the Lynx ComboBox2 that might be able to help me with this?

    When I dynamically resize the combobox with a different font size the dropdown list cuts the entries in half. See image below.

    Name:  Mistery2.png
Views: 274
Size:  1.7 KB

    No amount of pleading, begging, cursing or threatening will change it's behaviour. I only have two of these comboboxes in the program where I need multiple columns. The other one did the same but eventually got it to work. But this one seems to have a mind of it's own.

    I even tried copying the one that works to the form and then it also stopped working.

    Any help/suggestions highly appreciated.

    Or are there maybe another combobox control that works that support multiple columns?

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,083

    Re: Lynx ComboBox 2

    Do you need multiple columns? It looks like just using a single column with a fixed font would give you the appearance you seem to be going for there.

  3. #3
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    7,820

    Re: Lynx ComboBox 2

    It looks like a DPI (monitor scaling) issue to me. Does it work correctly if all your monitors are scaled to 100%?
    Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

  4. #4
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    7,820

    Re: Lynx ComboBox 2

    And I just looked around a bit, and it doesn't seem that I've ever implemented a ComboBox with multiple columns in the pulldown. It's sure a good idea though.

    I'm assuming that only the first column (or maybe you can specify) is placed into the ComboBox's text area.

    I can think of a couple of ways to do this, but they all would require some subclassing. Probably the easiest is to catch the ComboBox's creation in our subclassing, and set the pulldown font to Courier New (which is fixed character width). Then, we'd have to set a convention, such as maybe using vbTab in the AddItem argument to separate columns, and then also catch this in subclassing and space it out. Or, maybe have a new property (something like AddItemCols that had a ParamArray) that did this for us.

    Talk more about your needs, and maybe I'll play around with doing this.
    Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Roodepoort, South Africa
    Posts
    459

    Re: Lynx ComboBox 2

    I've given up on the idea Tried everything I could think of and nothing worked. Spend many hours with no satisfaction

    Idea was to have the multi column dropdown combo with Invoice numbers in col1, Date in col 2 and Customer in col 3 etc etc. Select the year and month in separate comboboxes will then filter all the invoices for the selected year and month in the multi column combobox where it's easy to see the details and select the invoice. The invoice number in col 1 is automatically entered into the combobox when selecting an invoice.

    A normal combobox is limited to the length of the combobox to show data, if I'm not mistaken, so one would need to make a long combobox to show everything and then upon selection all the data would be entered into the combobox. The Lynx multi column combobox allows the dropdown list to be wider than the actual combobox so one could show more information and selecting an entry returns only the value in col 1 into the combobox.

    Subclassing is above my abilities so eventually changed my form to display the invoices in a separate listview and selecting the invoice from there. Made the form much bulkier than it would have been with the multi column combobox but at least it's working.

  6. #6
    Fanatic Member
    Join Date
    Jun 2015
    Posts
    711

    Re: Lynx ComboBox 2

    You could mock up your own where the list view popped up when a button with a down arrow was selected and auto hide on selection. Set z order so it floats over other controls and add a filter text box at bottom to filter the list. Could be fine without subclassing

  7. #7
    New Member
    Join Date
    Nov 2013
    Posts
    13

    Re: Lynx ComboBox 2

    Quote Originally Posted by Bezzie View Post
    I've given up on the idea Tried everything I could think of and nothing worked. Spend many hours with no satisfaction

    Idea was to have the multi column dropdown combo with Invoice numbers in col1, Date in col 2 and Customer in col 3 etc etc. Select the year and month in separate comboboxes will then filter all the invoices for the selected year and month in the multi column combobox where it's easy to see the details and select the invoice. The invoice number in col 1 is automatically entered into the combobox when selecting an invoice.

    A normal combobox is limited to the length of the combobox to show data, if I'm not mistaken, so one would need to make a long combobox to show everything and then upon selection all the data would be entered into the combobox. The Lynx multi column combobox allows the dropdown list to be wider than the actual combobox so one could show more information and selecting an entry returns only the value in col 1 into the combobox.

    Subclassing is above my abilities so eventually changed my form to display the invoices in a separate listview and selecting the invoice from there. Made the form much bulkier than it would have been with the multi column combobox but at least it's working.

    I used the LynxCombo2 quite a bit until I decided to make one of my own (with a lot of help by the way, thanks friend Elihú), if you want, make a little revision if it works for you ...

    https://github.com/AxioUK/AxMCCombo

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2007
    Location
    Roodepoort, South Africa
    Posts
    459

    Re: Lynx ComboBox 2

    Quote Originally Posted by AxioUK View Post
    I used the LynxCombo2 quite a bit until I decided to make one of my own (with a lot of help by the way, thanks friend Elihú), if you want, make a little revision if it works for you ...

    https://github.com/AxioUK/AxMCCombo
    Thanks. Will have a look at it.

  9. #9
    New Member
    Join Date
    Jul 2018
    Posts
    12

    Re: Lynx ComboBox 2

    Quote Originally Posted by Bezzie View Post
    Thanks. Will have a look at it.
    Dear sir github linked codes are not complete

  10. #10
    New Member
    Join Date
    Nov 2013
    Posts
    13

    Re: Lynx ComboBox 2

    Quote Originally Posted by badialsoft View Post
    Dear sir github linked codes are not complete
    Updated Github....

    Sorry for the inconvenience..,

  11. #11
    New Member
    Join Date
    Jul 2018
    Posts
    12

    Re: Lynx ComboBox 2

    Thanks sir for good stuff.

    Is it possible to add WM_KEYDOWN to restrict certain keys. How to add .AddMsg UserControl.hwnd
    Last edited by badialsoft; May 20th, 2022 at 12:38 AM.

  12. #12
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    3,301

    Re: [RESOLVED] Lynx ComboBox 2

    The original post would have likely been solved by adjusting the item height with the CB_SETITEMHEIGHT message, if anyone wanted to use that. Thread's here, might as well not leave it unanswered.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width