Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: piere on October 29, 2013, 07:35:40 AM
-
Hello is it possible to make it so when a user hits the enter key, it will go down to a new line in the text editor field? Thanks
(http://snag.gy/xY6Y1.jpg)
-
As far as I can see, there is no support of formatting indetifiers in Editor field. So it's possible to try to get around the restriction by inserting spaces at the string's break, or try to find other method. For the detection of the breaking you can try the following code inside the window script.
on "Keypress"
{
{
edit.
Text = txt1 +
" " + txt2;
}
}
-
Thanks 2.0, you are always helpful. Is there a way that once the text in the textbox is outside of it, it goes to the next line? Right now of the text is outside of the bounds of the textbox, it just gets cut off. For example, if there is more letters in the text box than the length.
-
Hi. While I have no specific ideas on how to work around this limitation without changing the source code, except the sketch of the idea :)
Static control have a line feed. And if a duplicate row from the editor control to the static - output similar to the correct one.
on "editor"
{
var text =
this.
GetControl("text");
// Static control }
But if you get rid of the editor control, it ceases to receive and send events. Perhaps the keyboard events should be handled directly in the window script and letter by letter added a in a text string of the static control. And also to manually draw the cursor over it. Other ideas while aren't present.
-
Hey 2.0,
Thank you for the help. I very much appreciate it. I actually found a way to do this using a different method. I made a password protection note taking app in Wintermute and I will be submitting it to the app store soon ::rock
-
It is cool! And what the method consists of, if not a secret?
-
Hey 2.0,
Thank you for the help. I very much appreciate it. I actually found a way to do this using a different method. I made a password protection note taking app in Wintermute and I will be submitting it to the app store soon ::rock
I have had this issue for a long time, enough time to simply discard the multi-line functionality. I would really appreciate it too if you could show us the method you followed. :)
-
Simple. Just add mutiple editors, one underneath the other. When Enter is hit, or the Line.SelEnd is a certain number, it drops down to the next box. I have the graphics in place so it looks like one big box. Let me know if that helps.
-
Simple. Just add mutiple editors, one underneath the other. When Enter is hit, or the Line.SelEnd is a certain number, it drops down to the next box. I have the graphics in place so it looks like one big box. Let me know if that helps.
Really very elegant and simple solution :)
-
Thanks piagent, your solution looks nice and simple. I will try it asap.