Help with edit box please ;(

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello

    I made an edit box in my project and I checked the ''autoscroll'' options but it's not scrolling. Not sure if it's working properly...

    There is a manual way to do this with events or scripts, if so, how?

    Sorry for my bad english =/

    thanks for any help!

  • Hi. In my experience, those options just make it so that the text contained by the EditBox can be larger than the box itself.

    If you're looking to make it scroll so that you can see text that has been added to the EditBox through events, you can use the EditBox's Set Selection action to force it to show any area in the text.

    The following simple example would add the amount of time that the application has been running in a new line each time the LMB is pressed, then set a null-selection the end of the text.

    + MouseKeyboard: On Left mouse button Clicked

    -> EditBox: Append text Timer & NewLine

    -> EditBox: Select characters len(EditBox.Text) to len(EditBox.Text)

  • Hi. In my experience, those options just make it so that the text contained by the EditBox can be larger than the box itself.

    If you're looking to make it scroll so that you can see text that has been added to the EditBox through events, you can use the EditBox's Set Selection action to force it to show any area in the text.

    The following simple example would add the amount of time that the application has been running in a new line each time the LMB is pressed, then set a null-selection the end of the text.

    + MouseKeyboard: On Left mouse button Clicked

    -> EditBox: Append text Timer & NewLine

    -> EditBox: Select characters len(EditBox.Text) to len(EditBox.Text)

    thanks it worked, but now I got a new question.. It's possible to put a different background color on edit box? it's always white and also, how do I change the Font, color font, size of the font of the Edit Box? And finally, when I maximize my screen the edit box is not expanding, it stay in the same place with the same size, nothing happens..

    thanks for help!

  • The EditBox is a Windows object, so it does not behave like most other Construct objects do, such as sprites.

    I'm not aware of any way to change any of the things that you have mentioned, other than the position and size of it.

    I don't think that there is a 'On window resized' condition, but you could store the current size at start of layout in a couple of global variables, and compare those against the current size each tick, then resize the EditBox based upon the change if they are different. Then set the stored size to the current size...

    The System object has expressions under it's Display category for the display size, and the Window object has similar expressions for window size.

  • The EditBox is a Windows object, so it does not behave like most other Construct objects do, such as sprites.

    I'm not aware of any way to change any of the things that you have mentioned, other than the position and size of it.

    I don't think that there is a 'On window resized' condition, but you could store the current size at start of layout in a couple of global variables, and compare those against the current size each tick, then resize the EditBox based upon the change if they are different. Then set the stored size to the current size...

    The System object has expressions under it's Display category for the display size, and the Window object has similar expressions for window size.

    If I activate the fullscreen mode the editbox actually changes his size but it become invisible and nothing appear when writing, I can see the size is right because of the mouse pointer...

    any solution you may know how make it become visible with fullscreen mode? this would already help..

  • I've never tried full screen with an editbox until now, and I see it doesn't work correctly.

    I would guess that it doesn't work well because full screen uses DirectX to display, and it doesn't play well with Windows API. I don't know...

    I don't see a way to fix that, other than not using full screen.

    Perhaps you can use the Text object, or SpriteFont Plugin to do the display portion instead of the EditBox. If input is needed, there is an Input plugin in the WIP plugins forum that could be used for that. I'm sure that it's possible to emulate an EditBox.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've never tried full screen with an editbox until now, and I see it doesn't work correctly.

    I would guess that it doesn't work well because full screen uses DirectX to display, and it doesn't play well with Windows API. I don't know...

    I don't see a way to fix that, other than not using full screen.

    Perhaps you can use the Text object, or SpriteFont Plugin to do the display portion instead of the EditBox. If input is needed, there is an Input plugin in the WIP plugins forum that could be used for that. I'm sure that it's possible to emulate an EditBox.

    any idea how to make a text object scrolls down and have options to scroll up and down? I'm having some dificulties here hehe

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