You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2022/07/19 12:08:57 UTC
[royale-asjs] 01/04: Implement editable in emulation ComboBase - but now no mousedown reaction either
This is an automated email from the ASF dual-hosted git repository.
yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 0ddf20c1b0b9c25e675d20497415a84df758a6c6
Author: Yishay Weiss <yi...@hotmail.com>
AuthorDate: Tue Jul 19 13:20:15 2022 +0300
Implement editable in emulation ComboBase - but now no mousedown reaction either
---
.../src/main/royale/mx/controls/ComboBox.as | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
index 523fa9b386..ef5c894444 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
@@ -35,6 +35,8 @@ import mx.effects.Tween;
import org.apache.royale.geom.Rectangle;
import org.apache.royale.geom.Point;
import org.apache.royale.core.IUIBase;
+import org.apache.royale.core.IStrand;
+import org.apache.royale.html.beads.DisableBead;
import mx.managers.ISystemManager;
import mx.events.FlexMouseEvent;
import mx.core.UIComponentGlobals;
@@ -96,6 +98,10 @@ import mx.managers.ISystemManager;
import mx.managers.PopUpManager;
import mx.styles.CSSStyleDeclaration;
import mx.utils.MatrixUtil;
+import org.apache.royale.express.TextInput;
+import org.apache.royale.core.IContentView;
+import org.apache.royale.html.TextInput;
+import org.apache.royale.core.IStrand;
use namespace mx_internal;
*/
@@ -706,6 +712,33 @@ public class ComboBox extends ComboBase
{
(model as ISelectionModel).labelField = value;
}
+
+
+ private var _editable:Boolean;
+ private var _inputDisableBead:DisableBead;
+ override public function get editable():Boolean
+ {
+ return _editable;
+ }
+
+ override public function set editable(value:Boolean):void
+ {
+ _editable = value;
+ if (_inputDisableBead)
+ {
+ _inputDisableBead.disabled = !value;
+ }
+ }
+
+ override public function addedToParent():void
+ {
+ super.addedToParent();
+ var ti:IStrand = (view as IComboBoxView).textInputField as IStrand;
+ _inputDisableBead = new DisableBead();
+ _inputDisableBead.disabled = !_editable;
+ ti.addBead(_inputDisableBead);
+ }
+
//--------------------------------------------------------------------------
//