Wikipete Posted May 31, 2008 Posted May 31, 2008 Hi. I have created a GUI and now want to put in some read only text. I have done this fine and used the correct syntax. What I now need to know is how to go to a new line once I get to the borders of my textbox. Considering I am doing this in code I will need a method (such as "{enter}" - already tried, does not work, just prints {enter} and then dissappears off the side of my textbox). So basically what I am asking for is how to create a carridge return using SCITE for a GUI input box. Thanks. If you need an example of the code of the box, here it is: GuiCtrlCreateInput("Terms And Conditions for P B's 'M' Software.", 40, 70, 310, 150, _ BitOR($ES_MULTILINE, $ES_WANTRETURN, $PBS_VERTICAL, $PBS_SMOOTH, $ES_AUTOVSCROLL, $ES_READONLY, $ES_CENTER), $WS_EX_CLIENTEDGE) I want to continue the "Terms And Conditions for P B's 'M' Software." infinately and not have to worry about it dissappearing out the side of my textbox, but going down and allowing the user to scrol. Thank You. Run (Brain.exe).
martin Posted May 31, 2008 Posted May 31, 2008 Hi. I have created a GUI and now want to put in some read only text. I have done this fine and used the correct syntax. What I now need to know is how to go to a new line once I get to the borders of my textbox. Considering I am doing this in code I will need a method (such as "{enter}" - already tried, does not work, just prints {enter} and then dissappears off the side of my textbox). So basically what I am asking for is how to create a carridge return using SCITE for a GUI input box. Thanks. If you need an example of the code of the box, here it is: GuiCtrlCreateInput("Terms And Conditions for P B's 'M' Software.", 40, 70, 310, 150, _ BitOR($ES_MULTILINE, $ES_WANTRETURN, $PBS_VERTICAL, $PBS_SMOOTH, $ES_AUTOVSCROLL, $ES_READONLY, $ES_CENTER), $WS_EX_CLIENTEDGE) I want to continue the "Terms And Conditions for P B's 'M' Software." infinately and not have to worry about it dissappearing out the side of my textbox, but going down and allowing the user to scrol. Thank You.You need to read the help for GuiCtrlCreateInput $ES_MULTILINE is always reset.Use an Edit control, and use @CRLF for line breaks. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Wikipete Posted May 31, 2008 Author Posted May 31, 2008 You need to read the help for GuiCtrlCreateInputUse an Edit control, and use @CRLF for line breaks.Thanks! I am learning... slowly. Run (Brain.exe).
Wikipete Posted May 31, 2008 Author Posted May 31, 2008 (edited) You need to read the help for GuiCtrlCreateInputUse an Edit control, and use @CRLF for line breaks.Can you provide an example of an Edit control please? I have been through the ones in the Help file and all that are applicable are in my script. Edited May 31, 2008 by Wikipete Run (Brain.exe).
martin Posted May 31, 2008 Posted May 31, 2008 Can you provide an example of an Edit control please? I have been through the ones in the Help file and all that are applicable are in my script. #include <GUIConstantsEx.au3> #include <editconstants.au3> #include <windowsconstants.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $file, $btn, $msg GUICreate(" My GUI input acceptfile", 320, 120, @DesktopWidth / 2 - 160, @DesktopHeight / 2 - 45, -1, 0x00000018); WS_EX_ACCEPTFILES $file = GUICtrlCreateEdit("", 10, 5, 300, 80,BitOR($ES_MULTILINE, $ES_WANTRETURN, $ES_AUTOVSCROLL, $ES_READONLY, $ES_CENTER), $WS_EX_CLIENTEDGE) GUICtrlSetState(-1, $GUI_DROPACCEPTED) $btn = GUICtrlCreateButton("Ok", 40, 90, 60, 20) GUICtrlSetData($file, "abc" & @CRLF & "def") GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $btn ExitLoop EndSelect WEnd MsgBox(4096, "drag drop file", GUICtrlRead($file)) EndFunc ;==>Example Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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