Add getStringLength() support for UITextField

This commit is contained in:
Frank.Xu 2014-06-05 17:59:54 +08:00
parent f4d8e396e2
commit b74040a2ac
2 changed files with 6 additions and 0 deletions

View File

@ -564,6 +564,11 @@ const std::string& TextField::getStringValue()
{
return _textFieldRenderer->getString();
}
int TextField::getStringLength() {
return _textFieldRenderer->getStringLength();
}
bool TextField::onTouchBegan(Touch *touch, Event *unusedEvent)
{

View File

@ -140,6 +140,7 @@ public:
bool isMaxLengthEnabled();
void setMaxLength(int length);
int getMaxLength();
int getStringLength();
void setPasswordEnabled(bool enable);
bool isPasswordEnabled();
void setPasswordStyleText(const char* styleText);