Jump to content
Sign in to follow this  


Recommended Posts


Hi all,

This is my first go at Combo Boxes....

I have a shell of a GUI that I would like to use, but I have not yet figured out how to add values to two combo boxes that I have. To make it more complicated at least to me (maybe not to you), I would like my second combo box Prodversion to stay hidden until a selection is made in combo box 1 Products.

The values for each combo box will either come from a flat file or maybe a database (I haven't decided yet), and the values displayed in Bombo box 2 will be sppecific to the value selected in combo box 1.

For starters I would just like direction on how to add the values to the combo box and I will fight from there.

I have included my code below.

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Local $PWVD 
Local $Label1
Local $Label2
Local $Products
Local $ProdVerions
Local $Download
Global $DResult

$PWVD = GUICreate("PWVD DevCentral Download Interface", 382, 122, 313, 210)
$Label1 = GUICtrlCreateLabel("Select a Product ", 32, 16, 110, 17)
$Label2 = GUICtrlCreateLabel("Select a Version", 232, 16, 99, 17)
$Products = GUICtrlCreateCombo("Products", 32, 40, 121, 25)
$ProdVerions = GUICtrlCreateCombo("ProdVerions", 232, 40, 73, 25)
$Download = GUICtrlCreateButton("Download", 136, 80, 97, 25, 0)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
        Case $Label1
        Case $Products
        Case $ProdVerions
        Case $Download
             $DResult = True 

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.