namedrisk Posted September 23, 2009 Share Posted September 23, 2009 (edited) Hi, I am trying to make my UPDATE button work but it won't when i click it, but if i set the List directly it will work just fine... here is the code i am using to test: expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ListBoxConstants.au3> #include <ComboConstants.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Include <Misc.au3> $wName = 'xXx' #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Update Test", 306, 346, 196, 118, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_OVERLAPPEDWINDOW,$WS_TILEDWINDOW,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS)) $Menu = GUICtrlCreateTab(0, 0, 305, 345) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $Waypoint = GUICtrlCreateTabItem("Waypoint") $WaypointSelList = GUICtrlCreateGroup("Select Waypoint Profile", 8, 33, 289, 113) GUICtrlSetFont(-1, 8, 400, 0, "Arial") $WaypointListSelection = GUICtrlCreateLabel("Select a waypoint:", 16, 57, 94, 18) $WaypointCombo = GUICtrlCreateCombo("", 16, 81, 145, 25, $CBS_DROPDOWNLIST) $WaypointBtnOk = GUICtrlCreateButton("OK", 16, 113, 51, 25) $WaypointBtnUpdate = GUICtrlCreateButton("UPDATE", 80, 113, 56, 25) GUICtrlSetOnEvent($WaypointBtnUpdate, "ListWaypoint") GUICtrlCreateTabItem("") #EndRegion ### END Koda GUI section ### GuiSetState() Do Until GuiGetMsg() = $GUI_EVENT_CLOSE Func ListWaypoint() $WaypointComboUpdate = '' $ListWaypoint = IniReadSectionNames("Waypoints.ini") For $i = 1 To $ListWaypoint[0] If $WaypointComboUpdate = '' Then $WaypointComboUpdate = $ListWaypoint[$i] Else $WaypointComboUpdate = $WaypointComboUpdate&'|'&$ListWaypoint[$i] EndIf Next GUICtrlSetData($WaypointCombo, "") ; Clear previous info to avoid duplicated information on the dropdown list GUICtrlSetData($WaypointCombo, $WaypointComboUpdate) ; Update with new content EndFunc thanks in advance Edited September 23, 2009 by namedrisk Link to comment Share on other sites More sharing options...
Yashied Posted September 23, 2009 Share Posted September 23, 2009 Add Opt("GUIOnEventMode", 1). My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted September 23, 2009 Share Posted September 23, 2009 You can't mix OnEvent- and MessageLoop-mode like that. Open the helpfile, browse to "GUI Reference" and read those 3 pages. It will take a couple of minutes but you will be able to make a basic GUI like that working. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
namedrisk Posted September 23, 2009 Author Share Posted September 23, 2009 Add Opt("GUIOnEventMode", 1).Thanks man that works just fine for me it updates now You can't mix OnEvent- and MessageLoop-mode like that. Open the helpfile, browse to "GUI Reference" and read those 3 pages. It will take a couple of minutes but you will be able to make a basic GUI like that working.Thanks for the information i am reading it right now indeed it has some good references that i was missing... Link to comment Share on other sites More sharing options...
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