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 Classic Chat / [SOLVED] Edit Box text line

Author
Message
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 8th Apr 2019 16:02 Edited at: 8th Apr 2019 16:03
When the text line is longer than the width of the Edit Box the line scrolls to the right.
Is there any way to force an Edit Box to display the text from the beginning upon finish editing?

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

Go to answer

Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 8th Apr 2019 16:07
You could set the cursor position to 0 after an edit has been done

SetEditboxCursorPosition()

basically wait for GetEditBoxChanged( index ) to be 1 then set the cursor position back to 0.
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 8th Apr 2019 17:42
It does't work.
Do you have working example?
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 8th Apr 2019 20:41
Maybe refresh the text in the editbox?
Regards Sph!nx
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 8th Apr 2019 21:39 Edited at: 8th Apr 2019 21:40
This post has been marked by the post author as the answer.
Actually it does work



The example program above allows you to type in some text then after pressing return the text is left aligned so that you see the beginning of the text entered instead of the end. Its really quite simple.

Try typing some text which is larger then the edit box then press return and sure enough the text is left justified. It works on PC at least and on the one android device ive tried.

Are you trying to create a multiline editbix or something else??? Your problem doesnt seem to be too well described - so perhaps you want something else.
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 9th Apr 2019 09:49
@Bengismo: Thank you very much.
Thanks to your snippet I realized where I was wrong

Login to post a reply

Server time is: 2024-11-23 01:47:01
Your offset time is: 2024-11-23 01:47:01