Sign in to follow this  
Followers 0
John117

Wrap an input box

11 posts in this topic

$input = GUICtrlCreateInput("Type Message Here", 10, 30, 230, 60)

This code pushes to the right. How can I make it text wrap instead? I have found button wrap, and a few others, but not input wrap.

Open to input, Thanks! :whistle:

Share this post


Link to post
Share on other sites



Dude. You're killing me.

Help File > Appendix > GUI Control Styles

Share this post


Link to post
Share on other sites

ok- that is where I went b4 my first post. I found button wraps, label wraps, etc. Noticed nothing about input wraps? still dont . . .

Share this post


Link to post
Share on other sites

bump - Can anyone tell me how to wrap this input box or offer help on where to clearly learn how? Thanks!

$input = GUICtrlCreateInput("Type Message Here", 10, 30, 230, 60)

Share this post


Link to post
Share on other sites

I would recommend using Koda, it takes all the guess work out of GUIs.

Alt+m in Scite.

Share this post


Link to post
Share on other sites

Thanks!

I didn't know about that! looks like it will be good for future help!

It shows multiline, closest thing I see to wrap, but its greyed out. . . . Not sure if that would be more than one line if it wasnt greyed?

Share this post


Link to post
Share on other sites

If you need to have Multiline use an edit box.

Share this post


Link to post
Share on other sites

would that be considered more than one line?

I am taking the value and sending it with net send, so it will need to be one line. I would like it to wrap for longer lines.

?? Thanks for the help!

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("AForm1", 455, 197, 193, 115)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 449, 153)
GUICtrlSetData(-1, "AEdit1")
$Button1 = GUICtrlCreateButton("Show Message", 0, 160, 443, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            MsgBox(1, "Message", StringReplace(GUICtrlRead($Edit1), @CRLF, ""))
    EndSwitch
WEnd

It adds a @CRLF when you hit enter so you need to replace it with nothing, theres a sample.

Share this post


Link to post
Share on other sites

Thats what I was looking for! THanks a million! Been looking for hours!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0