Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [SOLVED] Multiple Line Text Box?

Author
Message
Ron2019
4
Years of Service
User Offline
Joined: 27th Jul 2019
Location:
Posted: 6th Jan 2020 17:43
Is there some way to specify that a text box should display multiple lines? Bing turns up nothing nor can I find any references here.

If not, is there some way to Position a Print command? I only seem able to make it print in the upper right hand corner of the window.

If neither is possible, I'd be curious to know how others display multiple lines of text, like instructions?

The author of this post has marked a post as an answer.

Go to answer

Qugurun
Valued Member
9
Years of Service
User Offline
Joined: 8th Dec 2014
Playing: AppGameKit
Posted: 6th Jan 2020 18:55 Edited at: 18th Jan 2020 06:58
This post has been marked by the post author as the answer.

add \n


add chr(10) or chr(13)


or



Attachments

Login to view attachments
Ron2019
4
Years of Service
User Offline
Joined: 27th Jul 2019
Location:
Posted: 6th Jan 2020 20:09
Thanks, Qugurun! I didn't think of inserting Chr(10).
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 17th Jan 2020 17:55
Things like chr(10) reeeally should be added to the manual. Same goes for the for i = 10 to 0 step -1 stuff that is absent from the manual.
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 18th Jan 2020 13:09
Quote: "Things like chr(10) reeeally should be added to the manual. Same goes for the for i = 10 to 0 step -1 stuff that is absent from the manual."

it is in the manual
https://www.appgamekit.com/documentation/Reference/Core/Chr.htm
life's one big game
spec= i5 4ghz, 16gb ram, Nvidia 1070ti gpu
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 18th Jan 2020 17:22 Edited at: 18th Jan 2020 17:30
Well yes it is and I stand corrected, although in my defense the AppGameKit Studio won't load the examples and you would only find it when already looking for chr().

And you wouldn't find chr() when searching for anything string related within AppGameKit Studio.

Also keeping in mind often you'd probably would look to do something like str(" Text first line \r\n Text second line \r\n Text third line " ) which doesn't work in AGK.

(As in, doesn't universally work for strings, it only works for Print() and only when using ' ' instead of " " )

Not saying that's a problem, as chr(10) works flawlessly.

But I wouldn't say it's straightforward to find in the manual.

In fact, a lot of times the real 'help' comes from the example code, which I wish would be made searchable.

To give another example;



I don't think the manual mentions this practical difference either and took me a while to figure out. I'm sure it is nitpicky to some people, as the chr(10) is still part of a string, despite 'looking' like a space. But yeah...

Login to post a reply

Server time is: 2024-04-18 19:36:35
Your offset time is: 2024-04-18 19:36:35