How to get the cursor position in the text edit box?

Hi, all.
I want to get the cursor position in the text edit box
to insert some data.
But I don't know how to get.
Can someone give me some advice?
BestRegard.
Miya.

Hi Miya,
Write your own textSelectionSuite for this.
and use ITextTarget->GetRange() function.
Thanks and Regards,
Yopangjo.

Similar Messages

  • How to control the cursor position in the Table control in Module pool

    Hi,
    Can any body tell me how to change the cursor positon from last field of the first record to the
    first field of the second record , when user presses enter in the last field in the module pool
    programming.
    Thanks

    Hi,
    Please avoid posting duplicate posts.
    Re: how to get the cursor position from screen in module pool program
    Nag

  • How to control the cursor position on a text item..

    Hello,
    How can we control the cursor position programmatically on a text item.
    i.e. how do we move the cursor to home or end of the text item.
    TIA,
    Hiten

    If you have an access to metalink.oracle.com, take a look at notes:
    Note 61656.1 (V45) HIGHLIGHTING A REGION OF TEXT
    Note 131028.1 Default Highlighting in Forms (Client Server)
    and threads from metalink forum:
    531481.996 "Select_All not working in 6.0.8.25.2", 153092.995 "Text item cursor position"

  • CS5 / Win: How can I detect an key in a text edit box

    Hi
    I like to detect a key (an input) in a text edit box. I suppose I have to install an observer.
    - Is that right?
    - Sample?
    I installed an observer for the dialog and attached the text edit box. But there is no call (in ::Update) if I do an input into the text edit box.
    Thanks
    Hans

    Hi Hans
    You can use EventHandler or Observer
    For observer, attach the Subject to IID_ITEXTCONTROLDATA
    InterfacePtr<ISubject> subject(this, UseDefaultIID());
    if (subject != nil)
    subject->AttachObserver(this, IID_ITEXTCONTROLDATA);
    and then look for change: kEditBoxKeyStrokeMessage
    For EventHandler:
    create KeyDown(IEvent* e) method and use
    const SysChar nCharCode = e->GetChar();
    to find which key was pressed, ie. kReturnKey kEnterKey
    EventHandler will notify you also if any of modifiers was pressed with the key, like Shift, Alt....
    Regards
    Bartek

  • [ADF Faces] set cursor position to the first column input text in ADF table

    How do i set the cursor position to the first column input text when i Insert a blank row?
    My idea is to implement using javascript. document.setfocus() but how do i do it from the backing bean code? or how do i install custom js to call document.setfocus()?
    any ideas?
    Message was edited by:
    user450391

    Did you try by iterating the selected row?
    Bind the table with the managed bean and then try with below code:
    RichTable empTable;
    RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys();   
    Iterator selectedEmpIter = selectedEmps.iterator();
    DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding empIter = bindings.findIteratorBinding("EmpView1Iterator");
    RowSetIterator empRSIter = empIter.getRowSetIterator();
    while(selectedEmpIter.hasNext()){
       Key key = (Key)((List)selectedEmpIter.next()).get(0);
       Row currentRow = empRSIter.getRow(key);
       System.out.println(currentRow.getAttribute("Ename"));

  • How can I get a cursor position?

    Hi Everyone!
    In my TextArea, there is a blinking cursor.
    How can I get the cursor position not the mouse position.
    Thanks,

    Thanks JefferyGong!
    That is selection index number, not the coordinate point.
    I want to know point position.
    Gyi

  • Java GUI cursor position in the window, mixed text editable and uneditable

    Hello,
    I primarily program in VBScript for Client Acces; but, I wanted to start creating user interfaces with Java.
    VBScript is not compiled on the private drive and anyone can learn how to do a program from well documented code; however, a compiled .class Java program does not have to be sent with the .java source code to work. The compiled program is unreadable by others and uneditable by others. Although I can do what I want with ActiveX programming, I want to use Java instead because it will prevent others from knowing how I program my solutions.
    The NetBeans IDE allows for controls to be dragged and dropped onto a screen; however, I want to know how to have uneditable and editable fields on the same page while allowing the cursor to be anywhere on the page and report its cursor position just as it is reported in Client Access.
    Does Java support the .Net Framework; or, does it have its own objects and methods to pull the cursor position in a window? I need the row and column, not the x and y coordinates.
    Java How To Program, Sixth Edition, has some deprecated code examples and I found working solutions from the Java Almanac. However, I did not see an example of this sort.
    What I will do once I know how to track the cursor position in the window is generate a Java based training module. Every computer at my workplace has Java runtimes installed, none of them have the .Net Framework installed. Java has a lot of tools that allow me to replace all my ActiveX programming with Java programming.
    Have a great Day!
    Jesse Grune.

    textArea.getCaret().getDot();
    or the shorter
    textArea.getCaretPosition();

  • Can any body answer this-Want to set the cursor position in textfield.

    i want my cusor position in textfield at the initial position which will come by default.
    but when i'm using the textfields in an inner class i'm getting the cursor position at the end of the text in text filed.pls can any body answer this.
    thanks in advance.
    if want run this example.
    import java.awt.*;
    import java.awt.event.*;
    class Testing extends JFrame implements ActionListener
         Container cnt;
         JButton jd;
         JTextField jt1;
         JTextField jt2;
         Testing()
              cnt = getContentPane();
              cnt.setLayout(new FlowLayout());
              jd = new JButton("OK");
              //jd.setBounds(50,50,100,30);
              cnt.add(jd);
              jd.addActionListener(this);
         public void actionPerformed(ActionEvent ae)
              Object but = ae.getSource();
              System.out.println("in action 00000");
              if(but.equals(jd))
                   System.out.println("in action ");
                   call();
                   return;
         void call()
              System.out.println("in action 1111111111");
              Inner inn = new Inner();
              inn.jdlg.show();
         public static void main(String s[])
              JFrame jf = new Testing();
              jf.setSize(200,200);
              jf.show();
         class Inner
              JDialog jdlg;
              //JTextField jt1;
              //JTextField jt2;
              Container cnt;
              Inner()
                   jdlg = new JDialog();
                   JLabel jla = new JLabel("Label");
                   jt1 = new JTextField();
                   jt2 = new JTextField(5);
                   cnt = jdlg.getContentPane();
                   cnt.setLayout(new FlowLayout());
                   cnt.add(jt1);
                   cnt.add(jt2);
                   jt1.setText("aaaaaaaa");
                   jt2.setText("bbbbbbbb");
                   System.out.println("the text "+jt1.getText());
                   jdlg.setSize(200,200);

    JTextFiled.setCaretPosition(0);

  • Locating the cursor position

    Is it possible to locate the cursor position in a text item? in other words can I find the number of characters to the left of the cursor in a text item?
    I really appreciate any kind of input on this.
    null

    I have to insert user selected variables that show up in a LOV into the text item at the cursor position.
    A sloppy workaround for this problem is asking the user to put in a pre defined symbol where ever he/she wants to insert the variables and then replace the variable with the value selected from the LOV using the REPLACE function. There is always a chance of error here!
    Instead if there is a way to know the cursor position, like the no. of characters to the left of the cursor or the cursor co-ordinates.............

  • How to get the cursor position on a picture?

    I'd like to show the cursor position on a picture
    which is 400 by 400 pixel size and located at
    (0, 0, 400, 400) on a panel. So suppose that the
    cursor is at (50, 50), how can the java code know?
    Thank you.

    I am thinking about this, and use something like
    JPanel.setFocusable(true). Thank you.

  • How to get the Useru2019s position when the user doesnu2019t have CP relation

    We have a custom program which will add / delete attributes (In transaction PPOSA_BBP). It is working fine for users which were assigned with CP relation But it fails for users which doesnu2019t have CP relation (since we are getting the position of users form HRP1001 then we are retrieving the existing attributes based on the position after that updating the attributes) as we are getting the position from HRP1001 it fails for users were no CP relation.
    Help us how to get the Useru2019s position when the user doesnu2019t have CP relation. Suggest us any function module or how to query the HRP1001 or some other table if exists
    Regards
    Paul

    Hi Paul,
    Have a look at these tables.
    Using table BUT000 the central business partner data are stored, f.e. partner type, partner names, partner number, partner guid, person number, etc. In table BUTBKK the bank data to a business partner are stored.
    Central business partner address data
    The table ADRC is used for the address of a business partner. Table BUT020 links the business partner number with the address number. Using table BUT021 several addresses to a business partner with different usages (modes), f.e. correspondence or delivery address, can be stored. The personal data of a business partner person are stored with key person number in table ADRP. The person number is assignd to a business partner person in table BUT000. Communication data of business partners as e-mail, telephone, fax, etc. are stored in the tables ADDR1 u2013 ADDR12. The business address of a contact person or an employee consists of the organization address (company resp. org.-unit) and of an address addition, which describes f.e. a building, a room number, etc. The address addition is stored in table ADCP and is identified by the keys address number of the organization address and person number.
    Relationships between business partners
    Table BUT050 contains the relationships between a business partner organization and a business partner person using relation types. The relation types are defined in table TBZ9, f.e. the relation type u2018has employeeu2019 corresponds to identifier u2018BUR010u2019, the relation type u2018has contact personu2019 corresponds to identifier u2018BUR001u2019. Table BUT051 stores communication data of a contact person relationship (compare to table ADCP). Table BUT052 stores several address numbers to one business partner relationship (including a standard flag).
    Hope this helps,
    Kind Regards,
    Matthew

  • Is there a way to get the cursor position index of html text field

    I'm trying to work on a text pad like MC with "insert text at
    position X" and "find and replace" can anyone tell me how to find
    the cursor index of an html text field. Selection.getBeginIndex() ,
    Selection.getEndIndex(), Selection.getCaretIndex() as far as I know
    these methods only work with text and not htmltext.
    What I'm trying to do is assign different parts of the string
    to variables so that I can combine them to reconstitute my html
    string.

    enfantterrible:
    If I understand correctly, you want the corresponding
    position in the
    htmlText propery of the caret index (which as you point out
    is only the
    position in the plain text version of the textfield content).
    Below is how I would do it. Maybe there's an easier or more
    efficient
    way (using XML objects etc), but I don't know it. You could
    conduct all
    your string searches in the plain text and then convert the
    result to
    the html positions. I didn't build this to accept negative
    parameters
    for the pos parameter (e.g. from end of string backwards) but
    the
    function could be adapted to do this too if necessary. The
    test data is
    not proper html from a text field, but it doesn't really
    matter what it
    is so long as its formatted correctly. It just separates the
    tags from
    the content to enable apples with apples comparison.
    //some test data
    var testStringXML = "<format>Hel<b>lo i can't
    t<i>ell you h</i>ow hap</b>py I
    am.</format>";
    var undecoratedString = "Hello i can't tell you how happy I
    am.";
    //the conversion function
    function findDecoratedPosition(pos:Number, xmlString:String,
    test:Boolean):Number {
    //anything between '<' and '>' should be excluded from
    plain text search.
    //create an array of array elements (n=2) consisting of tag
    then plain text
    //requires correctly formatted xml/html
    var tempArr:Array = xmlString.split("<");
    for (var aa = 0; aa<tempArr.length; aa++) {
    tempArr[aa] = tempArr[aa].split(">");
    //remove the first and last elements of the new array (these
    are empty)
    tempArr.pop();
    tempArr.shift();
    //find the corresponding plaintext location and calculate
    the "decorated" position
    var retPos:Number = 0;
    var posCount:Number = 0;
    for (var aa = 0; aa<tempArr.length; aa++) {
    retPos += tempArr[aa][0].length+2+tempArr[aa][1].length;
    //+2 allows for missing < and >
    posCount += tempArr[aa][1].length;
    if (posCount>pos) {
    return (retPos+(pos-posCount));
    //out of range
    return -1;
    //test code:
    for (var aa = 0; aa<undecoratedString.length; aa++) {
    var altPos = findDecoratedPosition(aa, testStringXML);
    trace(undecoratedString.charAt(aa)+" in position "+aa+"
    plainText equates to position "+altPos+" in the decorated version
    ["+testStringXML.charAt(altPos)+"]");
    }

  • How do i get an externally loaded movie clip to inherit the playhead position of the main timeline?

    Hi Flash experts, i'm hoping that someone can help me with this annoying problem.....
    I have been approached to design a configurator for a new television product. The Application will let users specify the colours of certain parts of the product and also attach addons, which then updates a cost total.
    In the main interface i have a looping animation of the product slowly rotating around 360 degrees that i rendered in 3ds max. When a user clicks a button on the interface i need to load an external movieclip on top of the main animation so it looks as though a certain part has changed colour, this i have acheived. The problem is that when i load the external clip over the original, the loaded clip starts playing from frame 1 and i need it to inherit the playhead position of the main animation so the two layered pieces look as though they are rotating as one. I'm sure this must be possible, unless i need to approach the problem in a different way?
    I hope this makes sense,
    Any help on this subject would be hugely appreciated.
    Many Thanks
    Matt

    Hi again Ned,
    I've almost got it i think, my code now looks like this....
    on (release) {
             var loader:MovieClipLoader = new MovieClipLoader();
             loader.loadClip("Bezel/Bezel_Red/Bezel_Red.swf",Empty_MC);
             var loadListener:Object = new Object();
             loader.addListener(loadListener);
             loadListener.onLoadComplete = function() {
             Empty_MC.gotoAndPlay(_root._currentframe);
    This code loads the external clip fine and i know the onLoadComplete listener is working because if i change the last line to: Empty_MC.gotoAndStop(1);
    it works. I think its just that last line: Empty_MC.gotoAndPlay(_root._currentframe); that is causing the problem?
    Many Thanks for all your help, it is greatly appreciated
    Matt

  • Can I insert a new text at the cursor's position In Formatted-Text-Edit?

    Hi Everyone,
        I am doing a task to enhance Formatted-Text-Edit,
        The task's goal is: simultaneously edit/display text and image.
        I decide to use Formatted-Text-Edit and Formatted-Text-View to realize the task.
        In Formatted-Text-Edit, user can edit the text and input URL for image,
        In Formatted-Text-View, the text and image can be displayed simultaneously.
        I add a button "Insert Image" besides the Formatted-Text-Edit,
       This is the key point:
       When user click the button, I want to insert a new text(URL of the image) at the cursor's position in Formatted-Text-Edit,
       But how can I get the cursor's position, and insert a new text at the cursor's position in FTE.
       Can anyone give me some suggestion or solution?
       Many thanks in advance.
    Best Regards,
    Derek

    I don't believe that you can get the cursor position yet with the FormattedTextEdit UI element. The best you could do currently is to place the insert at the end of the current text.
    Note duplicate thread/question to;
    Set cursor on the table column inherited with text edit UI element
    Please don't double post your questions in the forum.

  • How can I return to the same position in the calling order details form

    I am Calling a form for creating a new item from order details form, so after creating The new item I want to returned the item code to the calling form to same position in The order details form , how can I return to the same position in the order details form
    Waiting for your valuable answer .
    Best regards
    Jamil Alshaibani

    Dear Friends
    My actual problem description as the following
    I have a form for production order screen , and this form contain header and details blocks , so the user in the details will select Type Code , and he will go the next field that is Item Code Field search for specific Item Code if it is not exist he has to call the Item Definition Form by using this script
    CALL_FORM(ITEM_DEFINITION);
    Then when he finished defining the Item , and I assign the item code as the following in the :
    WHEN-BUTTON-PRESSED TRIGGER
    :GLOBAL.ITEM_CODE_VAR := :ITEM_CODE;
    DO_KEY('exit_form');
    But I don't know where to keep this assignment
    :ITEM_CODE := :GLOBAL.ITEM_CODE_VAR;
    inside the caller form in which trigger do I have to use when it return from the caller form it should assign the :GLOBAL.ITEM_CODE_VAR to the :ITEM_CODE and the cursor it should show inside the ITEM_CODE , and as I mention it does not return to the same location of The ITEM_CODE when it return from the calling form
    Waiting for your valuable answer .
    With example please .
    Best Regards
    Jamil Alshaibani

Maybe you are looking for

  • I have an ipod 2nd generation and it only works when i plug it in

    okay so i habe this ipod 2nd generation i actually have two and they are both doing the same thing at first i plug them in and the only thing that comes up is the do not disconeect screen but after a while oh fiddling with it i got the screen to go a

  • Apex 4.0 Collection Error

    Hello All I have a report created on collection here is the code: On Fetch Process before header: if NOT APEX_COLLECTION.COLLECTION_EXISTS (p_collection_name => 'EMP' ) then APEX_COLLECTION.create_collection( p_collection_name => 'EMP'); EXECUTE IMME

  • Help! K9VGM-V (MS-7253) with AMD 89 watt 6000+ OR 125 watt 6000+

    a related question to an old thread?   https://forum-en.msi.com/index.php?topic=119983.msg907875#msg907875 I have K9VGM-V (MS-7253). and have 6000+ 125 AMD CPU I bought at a bargain. What would happen if the 125 watt 6000+ was installed in stead of t

  • Inbox losing emails

    Hope someone can help! My inbox on my Macbook is losing emails. It seems that there is some sort of quota set for the size of the inbox, and it is automatically removing older messages as new ones come in. Yesterday I had 158 messages, today it is do

  • XML to IDoc scenario

    Hi all, for a customer I'm building an xml to IDoc scenario. The xml-file looks like this: <?xml version="1.0" encoding="UTF-8" ?> <ROOT>   <ROW>     <_5731 />     <_5735 />     <EMPLOYEE_SALARYNR>test</EMPLOYEE_SALARYNR>   </ROW> </ROOT> The message