Jump to content

Loading A Combo Field From A File.


 Share

Recommended Posts

i have a combo box that i want to have automaticly filled by reading a ini file can some one help?

here is my combo

GUICtrlCreateGroup("Select Sensor Model", 270, 135, 220, 100)
    $sensor_model=          GuiCtrlCreatecombo(" ", 280, 155, 195, 100); makes the combo gui window
                            GUICtrlSetData(-1,"|CA270|CA270V|CA279|CA295|KS127","")

here is my ini file read

FileOpen ($varr, 0); opens the file selected above
                                    If $varr = -1 Then
                                        msgbox(0, "IPU configuration tool ERROR", "Unable to open file. it does not exist. ")
                                        Exit
$sensor_model =         IniRead($varr,"data", "sensor_type", "ERROR, Key not found"); dropdown box value, reads value from file and places it in the variable listed

now the problem is that i do not know what to do from here. please help

endif

Link to comment
Share on other sites

i have a combo box that i want to have automaticly filled by reading a ini file can some one help?

here is my combo

GUICtrlCreateGroup("Select Sensor Model", 270, 135, 220, 100)
    $sensor_model=          GuiCtrlCreatecombo(" ", 280, 155, 195, 100); makes the combo gui window
                            GUICtrlSetData(-1,"|CA270|CA270V|CA279|CA295|KS127","")

here is my ini file read

FileOpen ($varr, 0); opens the file selected above
                                    If $varr = -1 Then
                                        msgbox(0, "IPU configuration tool ERROR", "Unable to open file. it does not exist. ")
                                        Exit
$sensor_model =      IniRead($varr,"data", "sensor_type", "ERROR, Key not found"); dropdown box value, reads value from file and places it in the variable listed

now the problem is that i do not know what to do from here. please help

endif

You will want to change the variable used to read the INI since it is the same name as the variable used to create the Combobox. Then you need to use GUICtrlSetData($sensor_model, ...) with the new data.
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
 Share

  • Recently Browsing   0 members

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