Make Auto Height Of TextBox

0 favourites
  • 6 posts
From the Asset Store
Forget about default textbox restrictions, you can create sprites atop of the textbox
  • Hello, i want to know how to make auto new line if max character on line if full (break line box). and the box auto set height itself, follow the new line. look the image bellow to understand what i mean.

    1. default height textbox (typing with space)

    2. the height textbox automatic set to 2 line of text area (typing without space)

    3. max height of textbox with 5 line (make auto line if the character max fill to row)

    so, how to make textbox like it? because i can't make with official plugin. please help me and im sorry for my bad english

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Bumb

  • Bumb...

  • Please help...

  • Help me

  • Hello oko4,

    this 'problem' is very simple to fix:

    1. write the new text in the text-object

    2. wait 0,1 second (is a system action)

    ... the Wait-action is required because the text must rendered to get the 'new' size

    3. text-object: set size to: width= Text.TextWidth + 10; height: Text.TextHeight + 10 (Text.TextHeight not Text.Height)

    ... if you don't add few pixels (in my code 10 pixels) it is possible that the objects height is not sufficient to display the second line

    I wanted to add a project file for testing, but i don't see a button for it. But I hope you can still fix your problem.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)