Blue_Drache Posted June 22, 2005 Share Posted June 22, 2005 (edited) I'm not asking for anyone to code for me, so please don't get that into your head. I've illustrated what I'd like and want to know if it is possible to achieve. I want a GUI that has a button that is the default in the case that enter is pressed in a text entry field and will take run the appropriate "CASE" statement as if the mouse button had clicked it. At the same time, the text entry field should have the focus by default with any default text entered selected for typing over. See picture for any clarification (if needed) Go...go...gadget PAINT! Edited June 22, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Blue_Drache Posted June 22, 2005 Author Share Posted June 22, 2005 can DLLCall + SetWindowLong + BS_DEFPUSHBUTTON be used to change a button to a default at runtime?... this may be a start...remember whenever using SetWindowLong use GetWindowLong first then BitOR in the BS_DEFPUSHBUTTON.Lar.<{POST_SNAPBACK}>Uh...DLLCall is over my head at this time. Seriously. Majorly Greek to me.I meant, can this be done with the standard routines currently built into AutoIt?If not, then I suppose I could pull out the help file and start tackling DLLCall. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
BigDaddyO Posted June 22, 2005 Share Posted June 22, 2005 Example: Note the $BS_DEFPUSHBUTTON and the $GUI_FOCUS. #region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("MyGUI", 392, 323,(@DesktopWidth-392)/2, (@DesktopHeight-323)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Button_1 = GuiCtrlCreateButton("Button1", 30, 90, 80, 30, $BS_DEFPUSHBUTTON) $Button_2 = GuiCtrlCreateButton("Button2", 30, 50, 80, 30) $Button_3 = GuiCtrlCreateButton("Button3", 30, 10, 80, 30) $Input_4 = GuiCtrlCreateInput("Input4", 120, 10, 200, 30) $Input_5 = GuiCtrlCreateInput("Input5", 120, 50, 200, 30) $Input_6 = GuiCtrlCreateInput("Input6", 120, 90, 200, 30) GUICtrlSetState($Input_6, $GUI_FOCUS) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $Button_1 msgbox(0, "Button1", "Button1 was selected") Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- Link to comment Share on other sites More sharing options...
Blue_Drache Posted June 22, 2005 Author Share Posted June 22, 2005 Example: Note the $BS_DEFPUSHBUTTON and the $GUI_FOCUS.<{POST_SNAPBACK}>I feel like such a nooblet....(sigh). Thanks for taking me to school, Mike. That did exactly what I wanted. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
jftuga Posted June 23, 2005 Share Posted June 23, 2005 Slightly OT... How can I tie the enter key in a widget created by GUICtrlCreateCombo() to the same function that is called when a user selects an item? -John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile Link to comment Share on other sites More sharing options...
Blue_Drache Posted July 1, 2005 Author Share Posted July 1, 2005 Slightly OT...How can I tie the enter key in a widget created by GUICtrlCreateCombo() to the same function that is called when a user selects an item?-John<{POST_SNAPBACK}>I'm afraid I don't understand the question, could you rephrase? Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache 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