Jump to content

Combo box inside List View?


Recommended Posts

Hello everyone,

I've been a lurker for a while, and have learned many things in these forums, which I've successfully applied. Now I was wondering if some of the most experienced users could assist me with a problem that I seem I can't find an answer to, even after searching.

I have a GUI that reads values from the registry, and populates the GUI. The window looks (kinda) like this:

Program Name | Program Version
Program A |
Program B |
Program C |
Program D |
Program E |

Under each column, program name and version are populated by the values found in the registry. Now, I need to check that the correct program is installed against another set of data. This comes in the form of an INI file, containing information like the sample shown below.

key1=Program BA~
key2=Program B~
key3=Program C~
key4=Program D~

I used "~" as the delimiter between the program name and the version number. Also, key0 holds the number of entries found in the program. This is so that when I read the value under key0, I will now how many programs were found in the master database. Note that the program names may not match the ones found in the registry, but the version should match, no matter the name. I want to change my original program to read this INI file to populate a combo box which I want to place after the "Program Version" entry. So, the new GUI would look like this:

Program Name | Program Version | INI Program Name
Program A | | Program BA/Program C
Program B | | Program B
Program C | | Program BA/Program C
Program D | | Program D
Program E | | No Program Found

The lines with "Program BA/Program C" would use a combo box to give the user the choice of selecting one or the other. But how can I add that combo box in the same listview window? Is that even possible? Also, can I only use a combo box when two items or more have a similar version number? Oh yeah, you may have noticed that while the program names may be different, it is the version number that doesn't change. Unfortunately, there's the chance that two programs could have the same version number, which led me to think that a combo box might be the solution I need. Of course, this is not set in stone, and if anyone has any pointers/tips on how to better implement what I want to do, I'm definitely open to suggestions.

I hope this helps explain what I'm trying to do. If you need more information, please do not hesitate to ask and I will provide whatever information I can. Sorry for the ASCII art... :-) And your time and help is greatly appreciated.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...