MattX Posted May 26, 2011 Share Posted May 26, 2011 Can someone point me in the right direction in regards to making a larger input box. [ It seems I can only get a single sentance size one ] I'm after a box that will be around 500x300 pixels [ enough to take some text which can then be copied straight into an E-mail client ] I've looked at Koda and Codewizard but can't seem to find anything suitable - would using GUICtrlCreateInput be better ? Thanks. Link to comment Share on other sites More sharing options...
GEOSoft Posted May 26, 2011 Share Posted May 26, 2011 (edited) Try using an Edit control in a custom GUI instead of the input box. Edited May 26, 2011 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
MattX Posted May 26, 2011 Author Share Posted May 26, 2011 Try using an Edit control in a custom GUI instead of the input box.Could not give me an example could you ? Or will Koda be able to do this ? Link to comment Share on other sites More sharing options...
Zedna Posted May 26, 2011 Share Posted May 26, 2011 Could not give me an example could you ? Or will Koda be able to do this ?Look at GUICtrlCreateEdit(), example is in helpfile.You can use Koda for this too, there is Edit control just next to Input control on Toolbar. Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
MattX Posted May 27, 2011 Author Share Posted May 27, 2011 Look at GUICtrlCreateEdit(), example is in helpfile.You can use Koda for this too, there is Edit control just next to Input control on Toolbar.Thanks - I can see that and I've used Koda to create very simple GUIs before however, I am at a complete loss in regards to using Edit to create a larger input box - I'm not a coder, just a simple support guy and this has me going around in circles at the moment.Do I have to create the edit box first and then tell it to be an input box or the other way around ? Does anyone know of a tutorial I can go through ?Thanks. Link to comment Share on other sites More sharing options...
MattX Posted May 27, 2011 Author Share Posted May 27, 2011 (edited) Right I've made this using koda: #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 633, 447, 192, 124) $Edit1 = GUICtrlCreateEdit("", 112, 48, 393, 289) GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd But it won't wrap lines - anyone ? Edited May 27, 2011 by MattX Link to comment Share on other sites More sharing options...
hannes08 Posted May 27, 2011 Share Posted May 27, 2011 #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Big input", 633, 447, 192, 124) $Edit1 = GUICtrlCreateEdit("", 32, 24, 569, 353) GUICtrlSetData(-1, "Default text") $Button1 = GUICtrlCreateButton("OK", 32, 400, 113, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("Cancel", 480, 400, 121, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ConsoleWrite(GUICtrlRead($Edit1) & @CRLF) Case $Button2 Exit EndSwitch WEnd Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Link to comment Share on other sites More sharing options...
MattX Posted May 27, 2011 Author Share Posted May 27, 2011 Thats brilliant - is there a way of stopping setting it to automatially wrap lines ? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Big input", 633, 447, 192, 124) $Edit1 = GUICtrlCreateEdit("", 32, 24, 569, 353) GUICtrlSetData(-1, "Default text") $Button1 = GUICtrlCreateButton("OK", 32, 400, 113, 25, $WS_GROUP) $Button2 = GUICtrlCreateButton("Cancel", 480, 400, 121, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ConsoleWrite(GUICtrlRead($Edit1) & @CRLF) Case $Button2 Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
MattX Posted May 27, 2011 Author Share Posted May 27, 2011 Thats brilliant - is there a way of stopping setting it to automatially wrap lines ?Ignore - I've added the $ES_MULTILINE 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