Jump to content

Is there a way to display multiple lines of text with GUICtrlCreateLabel


ainner
 Share

Recommended Posts

I would like to be able to write multiple lines of text without using 1 GUICtrlCreateLabel for each line. Is there a way to do a carriage return code inside the caption ?

Thx for the help !

#include <GUIConstants.au3>

; == GUI generated with Koda ==

$Form1 = GUICreate("AForm1", 682, 436, 209, 155)

GUISetBkColor(0xFFFFFF)

$Pic1 = GUICtrlCreatePic("\\m3sapp01\DATAZEN\AutoItFn\Images-a-Compiler\MSSSi2d.jpg", 8, 8, 298, 114)

GUICtrlCreateLabel("Installation d'Acrobat Writer 7.0", 152, 144, 365, 33)

GUICtrlSetFont(-1, 18, 800, 0, "MS Sans Serif")

GUICtrlCreateLabel("THIS IS MY FIRST LINE OF TEXT", 160, 216, 343, 28)

GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif")

$Button1 = GUICtrlCreateButton("HERE IS MY SECOND LINE", 136, 320, 145, 41, $WS_BORDER)

GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")

$Button2 = GUICtrlCreateButton("HERE IS THE THIRD", 400, 320, 145, 41, $WS_BORDER)

GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")

Link to comment
Share on other sites

Or if formatting concerns you:

GUICtrlCreateLabel("THIS IS MY FIRST LINE OF TEXT" & @CRLF & _
                   "THIS IS A SECOND LINE OF TEXT" & @CRLF & _
                   "THIS IS A THIRD LINE OF TEXT" & @CRLF & _
                   "THIS IS MY LAST LINE OF TEXT", 160, 216, 343, 58)

Edit: Typo's Duh!!

Edited by PartyPooper
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...