Jump to content

How to add block of text ...


Recommended Posts

I'm having a lot of trouble with this one aspect of using either tool. I can create the boxes just fine and manage to work with them adding the syntax to them, generally speaking. I seem to be doing okay with that. However, when I need to add a block of text, I can't find out how to do that. If I use "label", can't do "carriage returns" or multiple lines, as far as I can see.

The help file in one talked about text strings but and an edit box to do this with, but then didn't bother to say how to get that edit box <g>. Going through everything I could see on the interface didn't yield this.

The difficulty with building the GUI boxes and going back later to the code and adding the text with " & CR & " manually, etc., is the time involved. I ended up going back to using the Code Wizard and building a more limited message box, simply because I could easily go through the 10-12 edits to get the info and placement right. Even with the code wizard, it took me about 15 minutes to get the box just so.

Any tips on automating multiple line information text on a GUI?

Thanks. :)

Link to comment
Share on other sites

I'm having a lot of trouble with this one aspect of using either tool. I can create the boxes just fine and manage to work with them adding the syntax to them, generally speaking. I seem to be doing okay with that. However, when I need to add a block of text, I can't find out how to do that. If I use "label", can't do "carriage returns" or multiple lines, as far as I can see.

The help file in one talked about text strings but and an edit box to do this with, but then didn't bother to say how to get that edit box <g>. Going through everything I could see on the interface didn't yield this.

The difficulty with building the GUI boxes and going back later to the code and adding the text with " & CR & " manually, etc., is the time involved. I ended up going back to using the Code Wizard and building a more limited message box, simply because I could easily go through the 10-12 edits to get the info and placement right. Even with the code wizard, it took me about 15 minutes to get the box just so.

Any tips on automating multiple line information text on a GUI?

Thanks. :)

You can use either labels or edits Diana. You just have to get the control size large enough.

$GUI - GUICreate("My GUI", 500, 300)
$Lbl = GUICtrlCreateLabel("", 10,10, 480, 280)
GUICtrlSetData($Lbl, "This" & @CRLF & "is" & @CRLF & "a" & @CRLF & "very" & @CRLF & " large" & @CRLF & "block")
GUISetState()
While 1
   IF GUIGetMsg() = -3 then Exit
Wend

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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