Krikov Posted July 14, 2005 Posted July 14, 2005 Hello, Is it Posslible to Create a Gui With A ComboBox or ListBox That Get the Data from a txt file Regards Krikov [topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]
GaryFrost Posted July 14, 2005 Posted July 14, 2005 You'll have to read the data in then put in the control at this time. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Krikov Posted July 14, 2005 Author Posted July 14, 2005 can you give me an Expmple for that ? Please... [topic="63488"][font="Arial"]Krikov Tray Quick Menu[/font][/topic]
sandyd Posted July 14, 2005 Posted July 14, 2005 Quick and dirty... #include <GUIConstants.au3> #include <file.au3> GUICreate("My GUI combo") ; will create a dialog box that when displayed is centered GuiCtrlCreateCombo("", 24, 16, 145, 21) $NoOfItems=_FileCountLines("c:\combovalues.txt") Dim $ComboValues[$NoOfItems-1] _FileReadToArray("c:\combovalues.txt", $ComboValues) For $LoopCtr = 1 to $ComboValues[0]-1 GUICtrlSetData(-1,StringStripCR($ComboValues[$LoopCtr])); add other items Next GUISetState () ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend ----[ SandyD ]---
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now