Jump to content
Sign in to follow this  

Several lines of text on a button.

Recommended Posts


I am trying to fit it all into my GUI, and it would help so much to have several lines of text on some buttons.

I can't figure out how to do it.

I tried this..

$Button = GUICtrlCreateButton("line1" & @CRLF & "line2", 1, 1, 130, 50)

But it did not work. It only showed a strange text-symbol for the carriage return (@CRLF)

Any ideas?

I love the AutoIt program.. what a tool!


Share this post

Link to post
Share on other sites


#include <GUIConstants.au3>

$Gui = GUICreate("Multiline Button", 200, 200)
$Button = GUICtrlCreateButton("Heaps of text can fit on one button" & @CR & "if you use the control style " & _
                                "$BS_MULTILINE" & @CR & "when creating your button." & @CR & _
                                "CLICK TO CONTINUE..", 10, 10, 180, 80, $BS_MULTILINE)
GUISetState(@SW_SHOW, $Gui)

While 1
    $msg = GUIGetMsg()
        Case $msg = $GUI_EVENT_CLOSE
        Case $msg = $Button 
            GUICtrlSetData($Button, "Is this the information you've been looking for?" & @CR & "O   O" & _
                                       @CR & "   V   " & @CR & "\______/")


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.