You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by pu...@apache.org on 2019/12/09 10:23:29 UTC
[royale-asjs] branch develop updated: Update TextInput.as Added
editable property
This is an automated email from the ASF dual-hosted git repository.
pushminakazi pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new f9638f2 Update TextInput.as Added editable property
f9638f2 is described below
commit f9638f2ff1d0b3b7eaecc45b06ba5acb5d641e65
Author: pashminakazi <42...@users.noreply.github.com>
AuthorDate: Mon Dec 9 15:23:21 2019 +0500
Update TextInput.as Added editable property
---
.../src/main/royale/spark/components/TextInput.as | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as
index 0148f07..090576c 100644
--- a/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as
+++ b/frameworks/projects/SparkRoyale/src/main/royale/spark/components/TextInput.as
@@ -330,7 +330,23 @@ public class TextInput extends SkinnableTextBase
}
}
// END
-
+
+ private var _editable:Boolean = true;
+ override public function get editable():Boolean{
+ return _editable;
+ }
+ override public function set editable(value:Boolean):void{
+ _editable = value;
+ COMPILE::JS
+ {
+ if(value == false) {
+ (element as HTMLInputElement).readOnly = true;
+ }
+ else {
+ (element as HTMLInputElement).readOnly = value;
+ }
+ }
+ }
override public function set maxChars(value:int):void
{
super.maxChars = value;