Jump to content
Sign in to follow this  
JoseS

Combo box inside List View?

Recommended Posts

JoseS

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 | 1.1.00.25
Program B | 2.1.00.50
Program C | 1.1.00.25
Program D | 5.25.10.25
Program E | 3.1.00.51

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.

[data]
key0=5
key1=Program BA~1.1.00.25
key2=Program B~2.1.00.50
key3=Program C~1.1.00.25
key4=Program D~5.25.10.25
key5=ProgramE~2.1.00.51

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 | 1.1.00.25 | Program BA/Program C
Program B | 2.1.00.50 | Program B
Program C | 1.1.00.25 | Program BA/Program C
Program D | 5.25.10.25 | Program D
Program E | 3.1.00.51 | 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.

Jose

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.