technibel Posted August 4, 2006 Posted August 4, 2006 Hi. I'm trying to create an AdminGui with a Combo, a button, and Some ChildGuis. The Combo Field should be reload able. The only solution I found is to delete, and then create and load it new. It works fine as long I open a Child Gui and close it. Then the Reload Button only deletes the Combo and don't create it new. I have created an example script, where you can see what I'm trying to write about. Maybe my Code is Shit because I'm a Rooki AutoIT. But I hope I can get some SOLUTIONS at this Forum. Thanks to every reply! [autoit] #include <GUIConstants.au3> Dim $NewGUI = 0 Dim $avArray[8] $avArray[0] = 7 $avArray[1] = "Brian" $avArray[2] = "Jon" $avArray[3] = "Larry" $avArray[4] = "Christa" $avArray[5] = "Rick" $avArray[6] = "Jack" $avArray[7] = "Gregory" $MainGUI = GUICreate(" Map Editor", 205,200,-1,-1) $Exit = GUICtrlCreateButton("Exit",10,90,55,20) $New = GUICtrlCreateButton("New",75,90,55,20) $DelCombo = GUICtrlCreateButton("Reload",140,90,55,20) $Combo_3 = GuiCtrlCreateCombo(" ", 20, 20, 160, 20) for $i = 1 to $avArray[0] GUICtrlSetData($Combo_3, $avArray[$i]) next GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = -3 Exit Case $msg = $DelCombo GUICtrlDelete($Combo_3) $Combo_3 = GuiCtrlCreateCombo(" ", 20, 20, 160, 20) for $i = 1 to $avArray[0] GUICtrlSetData($Combo_3, $avArray[$i]) next GUISetState() Case $msg = $Exit Exit Case $msg = $New $Form1 = GUICreate("New", 100, 100, -1,-1,-1,$WS_EX_TOPMOST,$MainGUI) $Button_4 = GUICtrlCreateButton("Cancel", 10, 40, 80, 20) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = -3 ExitLoop Case $msg = $Button_4 ExitLoop EndSelect WEnd GUIDelete($Form1) EndSelect WEndchild5.au3
Danny35d Posted August 5, 2006 Posted August 5, 2006 (edited) Welcome to AutoIt,I ran your example script and work perfect on my computer, then I realize that I'm using the latest AutoIt Beta 3.1.1.133. When I try to run your script using AutoIt release 3.1.1, I notice the combo box disappear.You can download the latest AutoIt Beta here...I don't know if you used Scite as editor but, you can download it from here...After installing Scite and the latest AutoIt Beta you can run your script from Scite by pressing ALT+F5 Edited August 5, 2006 by Danny35d AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
technibel Posted August 5, 2006 Author Posted August 5, 2006 Big thanks to Danny35d for this helpful Solution. Great Forum, with great People.
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