How to get the selected text in a TextInput

Hallo. I have a textinput, and when the event doubleclick on a part of the text is sent, I need to get the selected text, and then save it in a string... How can I do?

THX

Max

Hi Maximist,

Below is the code snippet to get the selected text in TextInput on double click event:

http://www.Adobe.com/2006/mxml '.

Layout = "vertical".

verticalAlign = "middle".

backgroundColor = "white" >

Import mx.controls.Alert;

private void textInput_doubleClick(evt:MouseEvent):void {}

Alert.Show (String (evt.target.text) .slice (evt.target.selectionBeginIndex, evt.target.select ionEndIndex));

}

]]>

Text = "the Bullfighter is out the path of the bull charge at the last moment, drawing the cheers of the spectators."

doubleClickEnabled = "true".

doubleClick = "textInput_doubleClick (event); "/ >

Hope this will help you.

Thanks and greetings

------------------------------------------------------------------------------------

Pooja Kuber | [email protected] | www.infocepts.com

------------------------------------------------------------------------------------

Tags: Flex

Similar Questions

  • How to get the 'selected text '? leave a string

    If I highlight text in a text string, I want to be able to copy it to the Clipboard.

    I have already created an event that uses the Application of reference to 'write the Clipboard' now I need to give it the selected text.

    How do I do that?

    Here's a way to do it.

    Ben64

  • How to get the whole text of value special hashi

    Hello

    can someone let me know how to get the full text of sql data hash_value in report statsapck...
    SQL> select SQL_TEXT from v$sql where HASH_VALUE=3102119461;

    SQL_TEXT
    --------------------------------------------------------------------------------

    SELECT ROWID,AR_DT,AR_TXN_CODE,AR_NO,AR_AMD_NO,AR_REF_FROM,AR_REF_TXN_CODE,AR_RE

    F_NO,AR_DAK_CODE,AR_DED_SYS_ID,AR_COMP_CODE,AR_ACNT_YR,AR_AMD_DT,AR_AMD_UID,AR_A

    MD_RES_CODE,AR_REF_SYS_ID,AR_STUD_SRN,AR_APPL_DT,AR_ISSUE_DT,AR_ENROL_FRM_COURSE

    ,AR_ENROL_DT,AR_JOURNAL_YN,AR_TYPE,AR_TITLE,AR_VACANCY_CODE,AR_MRH_MRN,AR_INDUST

    RY_FIRM,AR_DEED_FM_DT,AR_DEED_TO_DT,AR_IT_TR_YN,AR_IT_START_DT,AR_CONDN_YN,AR_RE

    MARKS,AR_IT_END_DT,AR_CONDN_DAYS,AR_CONDN_AMT,AR_CONDN_DT,AR_CONDN_BY,AR_46_FLAG

    ,AR_RE_REG_YN,AR_DOC_STATUS,AR_ART_TERM_COMPLN,AR_TERMN_COMPLNPLN_DT,AR_CORRES_A

    DDR_LINE_1,AR_CORRES_ADDR_LINE_2,AR_CORRES_ADDR_LINE_3,AR_CORRES_CITY_CODE,AR_CO

    RRES_ZIP_POSTAL_CODE,AR_CORRES_BR_CODE,AR_CORRES_REGION_CODE,AR_CORRES_STATE_COD

    E,AR_CORRES_COU_CODE,AR_CORRES_TEL,AR_CORRES_EMAIL,AR_CORRES_MOBILE,AR_PER_ADDR_

    LINE_1,AR_PER_ADDR_LINE_2,AR_PER_ADDR_LINE_3,AR_PER_ADDR_LINE_4,AR_PER_CITY_CODE


    SQL_TEXT
    --------------------------------------------------------------------------------

    ,AR_PER_ZIP_POSTAL_CODE,AR_PER_BR_CODE,AR_PER_REGION_CODE,AR_PER_STATE_CODE,AR_P

    ER_COU_CODE,AR_PER_TEL,AR_APPR_DT,AR_AP


    SQL>

    You can query V$ SQLTEXT or V$ SQLTEXT_WITH_NEWLINES

    Thus

    select sql_text
    from v$sqltext
    where hash_value='&hash_value'
    and address='&address'
    order by piece;
    

    Note: In 10g and more, you can use instead of HASH_VALUE SQL_ID and ADDRESS.

    Additonally, in 10g and above, you can also query V$ SQLSTATS where the text is stored in a CLOB called 'SQL_FULLTEXT', we must therefore DEFINE the LONG value when using SQLPlus.

  • How to get the selected row in a programmatic table of the ADF (table generated from a bean)

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    How to get the selected line in a programmatic (using a SortableModel custom not a display object) ADF table (generated from a bean)?


    We are trying to get the selected row in a bean of a programmatic ADF table to retrieve data based on the selected line.


    Any idea?

    Well, you can use selectionListener to set the selected line to a variable of bean (but this bean must be in extended view or some superiors)

    Something like this: http://www.awasthiashish.com/2015/07/get-selected-row-singlemultiple-from.html

    Dario

  • DVT:pivotFilterBar - how to get the selected values of the filter

    Hi all

    I have a question: how to get the selected values from the pivot table filter bar programmatically?

    I tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
    but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.

    Environment: JDev 11.1.1.3.0 without tasks.

    Thank you
    Miroslaw

    Hello

    You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:

    Download the template of the bar pivot filter instance
    QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();

    retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
    List criterionList = conjunctionCriterion.getCriterionList ();
    for (int i = 0; i)<_criterionList.size(); i++)="">
    AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion.

    _selected is the currently selected value
    Selected object = criterion.getValues () .get (0);

    System.out.println (_selected);
    }

    Hope that helps,
    Chadwick

  • How to get the selected DataGrid item?

    Hello

    I have a datagrid

    < mx:DataGrid = "10" XY = dataProvider "36" = "{acEmaillist}" width = "319" >
    < mx:columns >
    < mx:DataGridColumn headerText = "Full name" dataField = "cn" width = "150" / >
    < mx:DataGridColumn headerText = "Email" dataField = "mail" width = "150" / >
    < / mx:columns >
    < / mx:DataGrid >

    I want to select a name, click it, get the selected name and save it in a string variable. Please let me know how to get the selected name when I click it. Thank you very much.

    M

    This code can help.


    http://www.Adobe.com/2006/mxml"width ="100% ">

    Import mx.controls.DataGrid;
    Import mx.events.ListEvent;

    [Bindable]
    private var nameStr:String;

    public void getName(event:ListEvent):void {}
    var dg:DataGrid = DataGrid (event.target);
    nameStr = dg.selectedItem.cn;
    }
    ]]>



    Bob Smith
    [email protected]


    Ted Alan
    [email protected]


    Fred Tobs
    [email protected]








  • CS6: create a simple extension: how to copy the selected text in the extension?

    Hello

    with this tutorial http://www.DWfaq.com/Tutorials/Extensions/simple_object.asp

    I created a very simple extensions in Dreamweaver CS6.

    But I can't find out how to get the code/selected text "in" this extension.

    I want to reformat the selection with the javascript code for the extension and replace the selected text.

    Thank you!

    mtemp

    Thank you very much for your answer!

    I didn't know the difference between these two methods - my google search for 'extension' led me directly to the old tutorial mentioned...

    And, Yes, I had to search long enough to find the 'object' extension on the fly on the menu...

    Now, I adapted the code referred to in the dreamweaver_cs5_extending.pdf for the creation of such an extension of command - and, wow, it works... with 'copy' the text selected in the extension form.

    So, thanks again! Now I'm on the right track

  • Get the selected text

    Hi guys

    I'm trying to format the selected text. I select text and want to make "BOLD". That's what I have so far:

    <mx:Script>
        <![CDATA[
        
            private function taBold():void {
                // do something
            }
            
        ]]>
    </mx:Script>
    
    <mx:Button id="bold" label="bold" click="taBold()"/>
    

    It would have been simple if an event has been registered for the selection of text because then I could use the setSelection and place the text in a textRange and do any update in shape that needed to be done. But as you can see the taBold() function is called, but no args are passed on it, which leads me to ask, how can I retrieve the text selection?

    Hi there you can use TextRange, take a look at the tutorials

    http://www.switchonthecode.com/tutorials/Flex-snippet-tutorial-using-the-TextRange-class

    http://blog.flexexamples.com/2007/08/01/using-the-TextRange-class-to-Hightlight-text/

  • How to search the selected text with a default search engine?

    Hello

    Before the recent update of the search bar, you can select your 'current' search engine, and a search for the selected text (right click on the selection) would use this engine.

    Now, it seems that you can only search for the selected text using the default engine. If that is correct, it's a big step backwards for me. For example, I can't have Google as my default search engine and the search for a text selected on eBay!

    Or am I missing something?

    Thank you!

    R.

    I find this extension very useful for selected items in the web pages. It offers all your search engines with select > right click.
    https://addons.Mozilla.org/en-us/Firefox/addon/context-search/?src=search

  • How to get the 'selection' illuminated

    I have a vista 64. I had a few printing problem which I found out wasa because google chrom. I had one tech outside and the problem has been corrected. However, I have an impression left of problem that I hope someone can help me with. I'm trying to print part of a page. I am the part children and then go to the print page. However, I cannot print print the part because the only 'all' and 'pages' are turned on. "selection is not lit, so I can't click. Can someone tell me how to recover the 'selection '.

    Hey, Dolores,.

    Your computer is configured to display pages in full screen? When this happens press F11 on your keyboard and see if the button reduce reappears.

  • How to get the selected values from the shuttle

    Hello

    Please tell me how to get the values of the option chosen by the shuttle leading the list.

    Thank you

    Check out this link and that this might help you.

    Attack-shuttle leak problem

    Thank you
    -Anil
    http://oracleanil.blogspot.com/

  • How to get the selected values of the af:selectManyChoice in the bean support

    Hello

    I have a selectManyChoice with a list of static, as shown below.
    At the click of the button, is called a method in the bean support. I want to get the list of the values selected by the method of the bean.
    How to do the same thing.
    <af:panelFormLayout id="pfl1" fieldWidth="50%" labelWidth="50%">
            <af:selectManyChoice label="Days" id="smc1"
                                 binding="#{Bean.addDaysChoice}">
              <af:selectItem label="Monday" value="MON" id="si17"/>
              <af:selectItem label="Tuesday" value="TUE" id="si13"/>
              <af:selectItem label="Wednesday" value="WED" id="si15"/>
              <af:selectItem label="Thursday" value="THU" id="si14"/>
              <af:selectItem label="Friday" value="FRI" id="si11"/>
              <af:selectItem label="Saturday" value="SAT" id="si16"/>
              <af:selectItem label="Sunday" value="SUN" id="si12"/>
            </af:selectManyChoice>        
              <af:commandButton text="Button"
                                actionListener="#{bean.callSomeMethod}"
                                id="cb1"/>  
    <af:panelFormLayout/>
    Thank you
    Ajay

    Published by: Ajay on January 31, 2011 06:26

    Hello

    What about setting the property "value" of the selectManyChoice, and then point to a method of the managed bean (setter/accessor for a variable of type list)?

    Frank

  • How to get the selected layers?

    Hi, how can I use the SDK for a list of the layers that are selected by the user when the plugin is activated?

    Let's talk terminology.

    an "activation" on a layer effect is not really the process of events.

    When an effect is used firstly to æ session, this is the function GlobalSetup()

    is called.

    This is the most 'activated' like thing in the effect by applying the process.

    This function is called only once per session (in general) and data

    allocated to it is shared between all instances.

    then, whenever a new instance is applied, the specific instance

    Function SeqeunceSetup() is called.

    It is the only clue you get tell you that a new instance is created.

    Unfortunately, in the course of this appeal you still cannot check the layer on which

    the effect will be applied, as at that time there AE still because preparations

    and has not done this topic yet. (try to get the effect layer will

    give an error)

    so when you say "on" I'm assuming you mean "applied".

    If an instance of the effect is already present in an economy effect, you get not one

    Call of SequenceSetup(), but a SequenceResetup() call instead. (or Unflatten())

    now, to detect if another instance is present on a layer, you must analyze

    This layer effects and check each because it is installed a key. (and match

    to you, of course)

    you will need to use:

    AEGP_GetLayerNumEffects

    AEGP_GetLayerEffectByIndex

    AEGP_GetInstalledKeyFromLayerEffect

    and now you hit the real problem.

    an effect cannot remove another effect of the same layer, sure it is. It will be

    very probably launch an error message as AE manages all the layer effects

    and suddenly; y an is missing.

    You can solve that by using a CEAP separated with a slow hook and make the

    deletion, or all just throwing your own message to the user by saying

    You cannot have two and set a flag on the second instance of turn it off

    process.

  • How to get the select button event Radio in my co

    Hello

    I want to get the the radio button selection event in my co, how do I get the event?

    Hello

    841475 wrote:
    I want to get the the radio button selection event in my co, how do I get the event?

    -There is no case of option button.
    -you need to explicitily set the event for the option button.

    Action: FirePaatialAction
    Event: RadioEvent

    -Discover the event in co by code below:

    If ("RadioEvent". Equals (PageContext.GetParameter (EVENT_PARAM)))
    {
    -In the case of a radio button. :))
    }

    Concerning
    Meher Irk

  • numericStepper - how to get the manual text entry

    I have a numericStepper that undergoes a change"listener that works very well when you use the keys up and down on the stepper (I can retrieve the value of the numericStepper). However, if the user types a value manually, then click off the Stairmaster, I can't retrieve the value of the stepper.

    Research on the web, I know that the 'change' event is enabled only via the arrows up/down on the NumericStepper, OR when the user presses the Enter key in the numericStepper text field.

    But I don't want the user to have to press Enter (they wouldn't always understand that they must do this - especially since there are several fields on the screen.

    So, I need to use the 'Focusout/focusouthandler()' event (right)?

    My problem, I can't retrieve the manual value typed in the NumericStepper.  The 'value' property always contains the last value set by the up/down arrows, or by pressing ENTER.

    For example,.

    • the value of the numericStepper indicates 75
    • I have manually enter 65 and then click outside of the numericStepper and go into another field.
    • The numericStepper component still shows 65, but when I trace the value of the numericStepper, it still shows 75.

    QUESTION: How do you get the value of the numericStepper textInput?

    Thank you, Julia

    -------------------------------------------

    It's my change event handler. The numericStepper instance name is "payRate_step" and I save the value in the variable ' newString '.

    var RatestepListener:Object = new Object();

    RatestepListener.change = function (evt_obj:Object) {}

    var newString:String = evt_obj.target.value;

    }

    payRate_step.addEventListener ("change", RatestepListener)

    who should inputField in as2 textField in as3.  my mistake.

    If ns is your stepper, use:

    import mx.controls.TextInput
    var ti: TextInput = ns.inputField;

    var tiLO:Object = {};
    tiLO.change = function(eobj:Object) {}
    trace (eobj. Target.Text);
    }
    NS.editable = true;
    ti.addEventListener ("change", tiLO);

Maybe you are looking for

  • Firefox freeze every time that tired to change the input language

    Hello. Whenever I tried to change the input language to enter in other languages Firefox freeze (program does not). Sometimes I type alt + shift or when I click on the language bar to select other languages. It also happens with several languages (I'

  • «Location is not available ~ access denied»

    When I try to open a variety of files in Windows Vista using the offers, I get the followiong: ' there is no location ~ access denied»  This occurs when you try to open the following files only: data of the Application;  Cookies; Local settings; My D

  • B200 m3 config

    I must add m3 my existing chassis of the m2s b200 b200 should vic or mezzane which card I expect? I wil do boot from san

  • Driver para instalar more hp officejet g85xi

    Estoy configurando more hp officejet g85xi, EN windows 7 Professional 32. don't solo is configurated escaner como no puedo usar como Patrick, anteriormente tenia xp y if estaba configurada pero are no puedo print don't y antes tampoco is ponia escanc

  • Aerial images

    What software Adobe is best suited for describing the properties and other sites (roads, lakes, rivers, etc.) on aerial images?