Jump to content

Several lines of text on a button.


nikolajp
 Share

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!

.nikolaj

Link to comment
Share on other sites

Hi

#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()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $Button 
            GUICtrlSetData($Button, "Is this the information you've been looking for?" & @CR & "O   O" & _
                                       @CR & "   V   " & @CR & "\______/")
    EndSelect
WEnd

Cheers

Link to comment
Share on other sites

  • 2 weeks later...

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...