Miyagi UI - TextBox questions

cyberjunk

05-08-2013 17:24:47

I'm trying to figure out if this is supported by Miyagi TextBox control:

1) TextBox control does not seem to support the left and right arrow-keys on my keyboard to move the caret location. Is this normal? The Backspace key works and positioning by clicking with mouse also moves the caret. I could use the Key events to code it manually, but I expected this to be some kind of "builtin" feature? May be I'm missing something? I found in TextBox.cs, which makes me think it's not supported, but why?


protected internal override bool IsArrowKeyMovementBlocked
{
get
{
return true;
}
}


2) Typical (Winforms, Java, Web, ..) TextBox implementations allow you to insert more text than what can be displayed. If you hit the displaylimit/the right border, then it basically removes the first character on the left end and adds the new one to the right. Miyagi TextBox control already has some "DisplayedText" and "Text" property, but I assume this behaviour is not yet supported by Miyagi TextBox? At least I could find nothing related to get working.

THANKS :-)

cyberjunk

05-08-2013 17:55:37

For 1)

I found the methods "HandleLeftArrow" and "HandleRightArrow" in "EditBoxElement.cs", so the feature is basically there.
But I noticed my Left and Right arrows keys give me a "NoName" value for "e.Key" in KeyDown events of TextBox, so it's also not handled.
Is this maybe a MOIS related issue? I'm using this for input.

smiley80

05-08-2013 18:55:43

1)
continues here:
https://bitbucket.org/tbohnen/miyagi/is ... xtbox-mois

2)
Texts are multi-line by default, which doesn't mix with text scrolling.
So:
TextBox.TextStyle.Multiline = false;

cyberjunk

06-08-2013 00:03:20

Thank you very much smiley80, again you have solved my issue :D
Miyagi is just awesome!


TextBox.TextStyle.Multiline = false;


Awk, so simple :-)

And about the ArrowKey... I added another note to the Bitbucket ticket.

cyberjunk

06-08-2013 02:11:28

Just another question about the TextBox, not worth another thread :-)

Assume you have a 'multiline=true' TextBox (no text scrolling this time):
How is the user supposed to insert a line break?

By line break I mean: 'System.Environment.NewLine' (or typically referenced as '\n').
I tried the ENTER key (usually new paragraph?) and the SHIFT+ENTER key (usually new line).
And also the ENTER key on NumLock..

None seem to have any effect for me.