Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Adding Values to Combo Box by reading sections from an InI


  • Please log in to reply
No replies to this topic

#1 cueclub

cueclub

    Adventurer

  • Active Members
  • PipPip
  • 144 posts

Posted 31 May 2012 - 10:03 PM

Okay so here it is, I am trying to update the combo box with the Section names of a ini. What I am needing is the Lastname written as a section name, and then add itself to the combo box. I will be using the combo box to look up informationb by lastname when it is selected.

Any thoughts on this?


Plain Text         
notes() Func notes() Local $File = @ScriptDir & "Notes.ini" GUICreate("Notes", 500, 450) ; will create a dialog box that when displayed is centered GUICtrlCreateLabel("Name", 5, 10, 100, 20) GUICtrlCreateLabel("Last Name", 110, 10, 100, 20) GUICtrlCreateLabel("Location", 215, 10, 100, 20) GUICtrlCreateLabel("Misc", 320, 10, 100, 20) Local $FirstName = GUICtrlCreateCombo("", 5, 30, 100, 20);Input("", 5, 30, 100, 20) Local $lastname = GUICtrlCreateInput("", 110, 30, 100, 20) Local $Location = GUICtrlCreateInput("", 215, 30, 100, 20) Local $Misc1 = GUICtrlCreateInput("", 320, 30, 100, 20) Local $Misc2 = GUICtrlCreateInput("", 320, 50, 100, 20) Local $Misc3 = GUICtrlCreateInput("", 320, 70, 100, 20) Local $Misc4 = GUICtrlCreateInput("", 320, 90, 100, 20) Local $Misc5 = GUICtrlCreateInput("", 320, 110, 100, 20) Local $Misc6 = GUICtrlCreateInput("", 320, 130, 100, 20) Local $Misc7 = GUICtrlCreateInput("", 320, 150, 100, 20) Local $Misc8 = GUICtrlCreateInput("", 320, 170, 100, 20) Local $Misc9 = GUICtrlCreateInput("", 320, 190, 100, 20) Local $Misc10 = GUICtrlCreateInput("", 320, 210, 100, 20) Local $Save = GUICtrlCreateButton("Save", 5, 100, 50, 20) GUISetState(@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1   $msg = GUIGetMsg()   If $msg = $GUI_EVENT_CLOSE Then ExitLoop   If $msg = $Save Then    Local $Name = GUICtrlRead($LasttName)    IniWrite($File, $Name, "Name", GUICtrlRead($FirstName))    IniWrite($File, $Name, "Location", GUICtrlRead($Location))    IniWrite($File, $Name, "Misc1", GUICtrlRead($Misc1))    IniWrite($File, $Name, "Misc2", GUICtrlRead($Misc2))    IniWrite($File, $Name, "Misc3", GUICtrlRead($Misc3))    IniWrite($File, $Name, "Misc4", GUICtrlRead($Misc4))    IniWrite($File, $Name, "Misc5", GUICtrlRead($Misc5))    IniWrite($File, $Name, "Misc6", GUICtrlRead($Misc6))    IniWrite($File, $Name, "Misc7", GUICtrlRead($Misc7))    IniWrite($File, $Name, "Misc8", GUICtrlRead($Misc8))    IniWrite($File, $Name, "Misc9", GUICtrlRead($Misc9))    IniWrite($File, $Name, "Misc10", GUICtrlRead($Misc10))    ExitLoop   EndIf WEnd GUIDelete() EndFunc   ;==>notes

Edited by cueclub, 31 May 2012 - 11:02 PM.











0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users