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 2020/12/02 09:12:18 UTC

[royale-asjs] branch develop updated: Update ComboBox.as added prompt

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 214987c  Update ComboBox.as added prompt
214987c is described below

commit 214987c89bbcbc6074ce1299de5ed1cc1bb859f1
Author: pashminakazi <42...@users.noreply.github.com>
AuthorDate: Wed Dec 2 14:12:12 2020 +0500

    Update ComboBox.as added prompt
---
 .../src/main/royale/mx/controls/ComboBox.as        | 44 ++++++++++++++++++++++
 1 file changed, 44 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 5f99a22..7f432b3 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/ComboBox.as
@@ -938,6 +938,50 @@ public class ComboBox extends ComboBase
 
         return " ";
     }
+    
+    mx.controls.ComboBox
+	
+    //----------------------------------
+    //  prompt
+    //----------------------------------
+
+    private var promptChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  Storage for the prompt property.
+     */
+    private var _prompt:String;
+
+    [Inspectable(category="General")]
+
+    /**
+     *  The prompt for the ComboBox control. A prompt is
+     *  a String that is displayed in the TextInput portion of the
+     *  ComboBox when <code>selectedIndex</code> = -1.  It is usually
+     *  a String like "Select one...".  If there is no
+     *  prompt, the ComboBox control sets <code>selectedIndex</code> to 0
+     *  and displays the first item in the <code>dataProvider</code>.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function get prompt():String
+    {
+        return _prompt;
+    }
+
+    /**
+     *  @private
+     */
+    public function set prompt(value:String):void
+    {
+        _prompt = value;
+        promptChanged = true;
+        invalidateProperties();
+    }
 
 
 }