Hi, everybody!
I'm trying to create a chat window where if the user wrote a longer string, the label would overflow to resize the height freely, so that if the user typed:
This is my question, I am writing a question, I am writing a question
It would appear on seperate lines, as such:
am writing a question,
I am writing a question
And, as in the chat window example, it should not submit the message unless the user presses the return key.
However, the Chat Window example and other examples haven't shown me how this works. The Chat window example's UIInput's label seems to keep switching back to Shrink Content whenever I try to change it, and when I turn on the "Resize Height" overflow option with a UIKeyBinding set with the keycode to "Return" and the action to "Select", it just makes a newline in my chat window -- it doesn't seem to work. It seems to me that UIKeyBindings don't work on UILabels when the overflow style is not set to clampcontent -- because when I set it to clampcontent, hitting enter DOES actually submit it properly with the return key.
So, to be specific, my questions are:
1) How can I create a UIInput that submits when the user presses enter, but which has ResizeHeight set as its overflow option?
2) What do "Select" or "PressAndClick" mean, when we're talking about UIKeyBindingActions? I don't know what it means to select something in NGUI. Does it mean to "Submit"?
Cheers, thanks for your help, here's to a great product.
Simon