Jump to content

Wrap an input box


Recommended Posts

$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:

Link to comment
Share on other sites

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

Alt+m in Scite.

Link to comment
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?

Link to comment
Share on other sites

If you need to have Multiline use an edit box.

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...