Damein Posted February 9, 2014 Share Posted February 9, 2014 (edited) For some reason I can't get this to work. Func _Floor1() GuiCtrlSetState($Floor1Image, $GUI_SHOW) For $i = 1 To 8 $RoomStatus[$i] = IniRead(@ScriptDir & "\Data\Floor1Rooms.ini", $i, "Status", "Not Found") $RoomImage[$i] = @ScriptDir & "\Images\" & $RoomStatus[$i] & ".bmp" $X = IniRead(@ScriptDir & "\Data\Floor1Rooms.ini", $i, "X", "Not Found") $Y = IniRead(@ScriptDir & "\Data\Floor1Rooms.ini", $i, "Y", "Not Found") GuiCtrlCreatePic($RoomImage[$i],$X,$Y,65,65) GuiCtrlSetState(-1, $GUI_SHOW) $CheckMaintenance = IniRead(@ScriptDir & "\Data\Floor1Rooms.ini", $i, "Maintenance", "Not Found") If $CheckMaintenance = 1 Then $MaintenanceButtonIssue[$i] = GuiCtrlCreateButton("Test",$X+12, $Y+12,40,40,$BS_BITMAP) GUICtrlSetImage(-1, $MaintenanceImage) GUICtrlSetOnEvent($MaintenanceButtonIssue[$i], "_Test") EndIf Next EndFunc All images show, and all buttons show. But I cannot click the button. If more information is needed I can provide the entire program with images, but I feel like I must just be missing something. Thanks. Edited February 9, 2014 by Damein Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Damein Posted February 9, 2014 Author Share Posted February 9, 2014 Oh, I think I found the fix. I had to add GuiCtrlSetState($MaintenanceButtonIssue[$i], $GUI_ONTOP) I've never used that before, but I assume from the name it means that the button is being created underneath the other images and thus can't be clicked? If there is a nicer way to doing this, I'll take it. But I'll update it with this for the moment. Thanks. Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Valuater Posted February 9, 2014 Share Posted February 9, 2014 This is probably a preferred way to handle it. GuiCtrlCreatePic($RoomImage[$i],$X,$Y,65,65) GuiCtrlSetState(-1, $GUI_DISABLE) 8) 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