Joec49 Posted June 14, 2008 Posted June 14, 2008 All button events defined....window comes up and buttons ignored...any ideas? $child = GUICreate("Event Details", 500, 400); GUISetOnEvent($GUI_EVENT_CLOSE, 'guiexit4') GUICtrlCreateLabel("View Event",100,10,-1,-1) GUISetBkColor(0x88AABB) GUICtrlCreateButton("SELECT",20,375,50,20) GUISetOnEvent(-1,'view_select') GUICtrlCreateButton("VIEW",400,100,50,20) GuiSetOnevent(-1,'view_view') GUICtrlCreateButton("DELETE",400,150,50,20) GUISetOnEvent(-1,'view_delete') GUICtrlCreateButton("HELP",400,200,50,20) GUISetOnEvent(-1,'view_help') GUICtrlCreateButton("QUIT",400,250,50,20) GUISetOnEvent(-1,'guiexit3') GUISetState(@SW_SHOW) ... Func guiexit3() GuiDelete($child) Return endfunc
Joec49 Posted June 14, 2008 Author Posted June 14, 2008 I stripped it down further and still no luckFunc anyname() $child=GUICreate("Details", 500, 400); GUISetOnEvent($GUI_EVENT_CLOSE, 'guiexit3') GUICtrlCreateButton("QUIT",200,100,100,100) GUISetOnEvent(-1,'guiexit3') GUISetState(@SW_SHOW)endfuncHere is the called functionFunc guiexit3() GuiDelete($child) ReturnendfuncThe button appears fine but when I click on it, nothing happens. I have done this with other windowsmany times before and it works fine but not here...any ideas?=====================================================================All button events defined....window comes up and buttons ignored...any ideas? $child = GUICreate("Event Details", 500, 400); GUISetOnEvent($GUI_EVENT_CLOSE, 'guiexit4') GUICtrlCreateLabel("View Event",100,10,-1,-1) GUISetBkColor(0x88AABB) GUICtrlCreateButton("SELECT",20,375,50,20) GUISetOnEvent(-1,'view_select') GUICtrlCreateButton("VIEW",400,100,50,20) GuiSetOnevent(-1,'view_view') GUICtrlCreateButton("DELETE",400,150,50,20) GUISetOnEvent(-1,'view_delete') GUICtrlCreateButton("HELP",400,200,50,20) GUISetOnEvent(-1,'view_help') GUICtrlCreateButton("QUIT",400,250,50,20) GUISetOnEvent(-1,'guiexit3') GUISetState(@SW_SHOW) ...Func guiexit3() GuiDelete($child) Returnendfunc
Developers Jos Posted June 14, 2008 Developers Posted June 14, 2008 Did you specify the Opt("GUIOnEventMode", 1) ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Joec49 Posted June 15, 2008 Author Posted June 15, 2008 Did you specify the Opt("GUIOnEventMode", 1) ?Yes - what I showed was a small section of the overall code. The other windows (with buttons) work fine but this does not.I simply cannot figure out why....Joe
Developers Jos Posted June 15, 2008 Developers Posted June 15, 2008 Yes - what I showed was a small section of the overall code. The other windows (with buttons) work fine but this does not.I simply cannot figure out why....JoeWell then you will have to show more code for us to understand your issue. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Joec49 Posted June 15, 2008 Author Posted June 15, 2008 Well then you will have to show more code for us to understand your issue.Here is more code and now QUIT works but the other buttons light when I movethe mouse over them but do nothing when I click except when I click on QUIT,it calls guiexit3 and does the proper thing. But SELECT, VIEW, DELETE and HELPare coded properly (I think) but ignored completely- only QUIT works.Func guiexit3() ;TAKES DOWN CHILD AND THEN RETURNS GuiDelete($child) Returnendfunc;The theview buttonfunc theview_delete() Msgbox(64,"theviewDELETE","HI")EndFuncfunc theview_help() $s= "This window allows you to see all scheduled reminders and" $s=$s & @cr & "sorts them in date/time order. You can view any selected" $s=$s & @cr & "item and also delete any selected item." Msgbox(64,"theview HELP",$s)EndFuncfunc theview_view() MSGBOX(64,"theviewVIEW","THERE")EndFuncfunc theview_select() MSGBOX(64,"VIEWSELECT","HI")EndFuncFunc theview() ;button $child=GUICreate("Reminder Event Details", 500, 400); GUISetOnEvent($GUI_EVENT_CLOSE, 'guiexit3') GUICtrlCreateLabel("REMINDER: View Event",100,10,-1,-1) GUISetBkColor(0x88AABB) GUICtrlCreateButton("SELECT",400,50,50,20) GUISetOnEvent(-1,"theview_select") GUICtrlCreateButton("VIEW",400,100,50,20) GuiSetOnevent(-1,'theview_view') GUICtrlCreateButton("DELETE",400,150,50,20) GUISetOnEvent(-1,'theview_delete') GUICtrlCreateButton("HELP",400,250,50,20) GUISetOnEvent(-1,'theview_help') GUICtrlCreateButton("QUIT",400,200,50,20) GUICtrlSetOnEvent(-1,"guiexit3") $listview =GUICtrlCreateListView("Seq#|Date|Time|Text", 10, 10, 350, 350) For $x = 1 To 100 GUICtrlCreateListViewItem($x & "|mm/dd/yyyy|hh:mm|randomtext", $listview); Next ;GUICtrlSetResizing($listview, $GUI_DOCKALL) GUISetState
Valuater Posted June 16, 2008 Posted June 16, 2008 for controls use GUICtrlSetOnEvent expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) Dim $child theview() Func guiexit3() ;TAKES DOWN CHILD AND THEN RETURNS GUIDelete($child) Return EndFunc ;==>guiexit3 ;The theview button Func theview_delete() MsgBox(64, "theviewDELETE", "HI") EndFunc ;==>theview_delete Func theview_help() $s = "This window allows you to see all scheduled reminders and" $s = $s & @CR & "sorts them in date/time order. You can view any selected" $s = $s & @CR & "item and also delete any selected item." MsgBox(64, "theview HELP", $s) EndFunc ;==>theview_help Func theview_view() MsgBox(64, "theviewVIEW", "THERE") EndFunc ;==>theview_view Func theview_select() MsgBox(64, "VIEWSELECT", "HI") EndFunc ;==>theview_select Func theview() ;button $child = GUICreate("Reminder Event Details", 500, 400); GUISetOnEvent($GUI_EVENT_CLOSE, 'guiexit3') GUICtrlCreateLabel("REMINDER: View Event", 100, 10, -1, -1) GUISetBkColor(0x88AABB) GUICtrlCreateButton("SELECT", 400, 50, 50, 20) GUICtrlSetOnEvent(-1, "theview_select") GUICtrlCreateButton("VIEW", 400, 100, 50, 20) GUICtrlSetOnEvent(-1, 'theview_view') GUICtrlCreateButton("DELETE", 400, 150, 50, 20) GUICtrlSetOnEvent(-1, 'theview_delete') GUICtrlCreateButton("HELP", 400, 250, 50, 20) GUICtrlSetOnEvent(-1, 'theview_help') GUICtrlCreateButton("QUIT", 400, 200, 50, 20) GUICtrlSetOnEvent(-1, "guiexit3") $listview = GUICtrlCreateListView("Seq#|Date|Time|Text", 10, 10, 350, 350) For $x = 1 To 100 GUICtrlCreateListViewItem($x & "|mm/dd/yyyy|hh:mm|randomtext", $listview); Next ;GUICtrlSetResizing($listview, $GUI_DOCKALL) GUISetState() While WinExists($child) Sleep(10) WEnd EndFunc ;==>theview 8)
Joec49 Posted June 16, 2008 Author Posted June 16, 2008 for controls use GUICtrlSetOnEvent Thanks - that did it! Thanks for taking the time to look at it expandcollapse popup#include <WindowsConstants.au3> #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) Dim $child theview() Func guiexit3() ;TAKES DOWN CHILD AND THEN RETURNS GUIDelete($child) Return EndFunc ;==>guiexit3 ;The theview button Func theview_delete() MsgBox(64, "theviewDELETE", "HI") EndFunc ;==>theview_delete Func theview_help() $s = "This window allows you to see all scheduled reminders and" $s = $s & @CR & "sorts them in date/time order. You can view any selected" $s = $s & @CR & "item and also delete any selected item." MsgBox(64, "theview HELP", $s) EndFunc ;==>theview_help Func theview_view() MsgBox(64, "theviewVIEW", "THERE") EndFunc ;==>theview_view Func theview_select() MsgBox(64, "VIEWSELECT", "HI") EndFunc ;==>theview_select Func theview() ;button $child = GUICreate("Reminder Event Details", 500, 400); GUISetOnEvent($GUI_EVENT_CLOSE, 'guiexit3') GUICtrlCreateLabel("REMINDER: View Event", 100, 10, -1, -1) GUISetBkColor(0x88AABB) GUICtrlCreateButton("SELECT", 400, 50, 50, 20) GUICtrlSetOnEvent(-1, "theview_select") GUICtrlCreateButton("VIEW", 400, 100, 50, 20) GUICtrlSetOnEvent(-1, 'theview_view') GUICtrlCreateButton("DELETE", 400, 150, 50, 20) GUICtrlSetOnEvent(-1, 'theview_delete') GUICtrlCreateButton("HELP", 400, 250, 50, 20) GUICtrlSetOnEvent(-1, 'theview_help') GUICtrlCreateButton("QUIT", 400, 200, 50, 20) GUICtrlSetOnEvent(-1, "guiexit3") $listview = GUICtrlCreateListView("Seq#|Date|Time|Text", 10, 10, 350, 350) For $x = 1 To 100 GUICtrlCreateListViewItem($x & "|mm/dd/yyyy|hh:mm|randomtext", $listview); Next ;GUICtrlSetResizing($listview, $GUI_DOCKALL) GUISetState() While WinExists($child) Sleep(10) WEnd EndFunc ;==>theview 8)
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