Positioning cursor in texteditor

Hi all,
     How to set cursor in texteditor control in
dynpro.
Regards,
bala

Use the methods of class CL_GUI_TEXTEDIT.
Try the method GO_TO_LINE.
Regards,
Ravi

Similar Messages

  • How to Set Position Cursor Option to Non key fields in Table Maintenance .

    Hi,
    I have created a Ztable and i am using table maintenance for that table. In TMG ,by default  we have position cursor option to key fields only . User wants that position cursor option for non key fields also. Please help me out of this issue .
    How to provide Position Cursor option to Non key fields.
    Thanks & Regards,
    Prasad.

    Hi Nabheet,
    I tried using TYPE S DISPLAY LIKE E and am setting vim_abort_saving as X and sy-subrc as 4. However, this is also not enabling the fields. In this case, the first 2 fields - key fields are getting enabled but not the required ones. The above snapshot is for the same.
    lv_date1 = table1-date1.
       lv_date2 = table1-date2.
       lv_diff = lv_date2 - lv_date1.
       IF lv_diff LT 0.
         CLEAR: lv_err_msg.
         lv_err_msg = text-005.
         MESSAGE lv_err_msg TYPE 'S' DISPLAY LIKE  lc_e.
         vim_abort_saving = lc_x.
         sy-subrc = 4.

  • Position Cursor on GRAPH either by dragging it OR entering the dsired position in the Cursor legend

    I've written a VI that allows the user to import a dataset, view it on a graph, and then use cursors to "filter" the range of data that I'm interested in, by sending the cursor.index values from the first graph to an array subset function which feeds a second graph.  The problem is that I'd like to provide the user the ability to position the cursors on the first graph both visually - by dragging - (for "course" control) AND by entering the desired values directly into the cursor legend (for fine control).  The problem is that I cannot find a way to do this, since I have to have the Lock Ring set to “Lock to Plot” in order to capture the index information. According to the documentation, the only way to be able to position the cursors via the Cursor legend is to set the Lock Ring to “Free”, which means the index values are rendered useless, since the cursor is no longer locked to the plot.  If I leave the Lock Ring in "Lock to Plot", and enter a value in the cursor legend, it does move the cursor, but not to where it should.  If I enter a value an x value of 9.0 for cursor 1, the cursor goes to 10.2638.  The next time I enter 9.0, it goes to 9.82794.  I don't understand what the issue is.  Is there a way around this?
    Attachments:
    ppv data filter 3.vi ‏366 KB

    Yes Rudi:  What I want is for the operator to place the cursors by dragging them (just eye-balling it).  The, if they see that the Y cursor (horizontal) is at 10.234, and they want to make it 10, they could simply enter that value in the cursor legend, and the cursor would be placed exactly at 10.  The only way to do this seems to be to select the “Free” option for the cursor.  However, in order to use the first graph to set the boundaries of the second graph, I have to use the Cursor Index from the first as an input to the Array Subset that feeds the second graph.  In order to use the Cursor Index, the first graph has to have its cursor Lock Rings set to “Lock to Plot”.  Am I making this any more understandable, or just rambling?

  • Position cursor in text field when form is opened

    Another newbee question I'm afraid!
    I want to position the cursor in a text field when a user opens the form. I can't find a way to do it but I'm pretty sure it's straightforward!
    Also, can I remove fields from the tab order?
    Thanks (for your help and patience!)

    Hi,
    You would select the object that you want to receive focus and put the following in the docReady event.
    xfa.host.setFocus("this");
    The docReady event is a good one to use, because it only fires once.
    The tab order can be set in the Tab Order tab. Depending on the version of LC Designer that you have, the flexibility will vary. However I would do this as a last step, as any changes can throw the tab order out of sequence.
    Note that tab order is greatly affected by the relevant x/y coordinates of objects and where objects are in separate subforms.
    Hope this helps,
    Niall

  • Positioning cursor in editable text-field

    It is almost impossible to position the cursor in a text-field. Even though I have very thin finger it takes me more than two tries to position the cursor. Would be nice if on a future PlayBook-update the behaviour of text-selection and cursor-positioning would be improved. Works much better on Android-devices (okey, they often have a scrollball) and iPhone.
    Check out my apps in the BlackBerry World
    Visit my developer blogs /dev/alopix and /home/alopix
    BBM Channel: C0047B612

    i dont have that issue with my fat fingers anymore with some practice. are you lightly touching or mashing while you select? i found mashing to make it less accurate. remember it is the first part that touches that makes the selection and not the top of your finger or thumb.
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • Position Cursor on a specific SO line in VA01 / 02

    Hi,
      I have a requirement to do some validation in the User Exit, SAVE_DOC_PREPARE for VA01 / 02. If there is a Error, I want the cursor to be positioned on the specific line item which had this error. Please note the above exit gets called the user presses the 'Save' buttn, so this can happen from any screen.
    Regards,
    SG..

    why don't you do the same thing with incompletion log procedure...system will take the user to that particular field and he can proceed with 'save' option in both VA01/02.
    Reward Points if it helps,
    Regards,
    N

  • JTextField:  How to selectAll() AND Position Cursor at Beginning of Text

    Hi All,
    I have a problem with when a JTextField is selected, I cannot simultaneously selectAll() and position the cursor at the beginning of the text. (selectAll() positions the cusror at the end of the selected text, not the beginning, which is what I require).
    Does anyone have a solution for this as I haven't found an answer as of yet.
    Many thanks.

    Thanks uncle_alice, but as far as I have determined, the setCaret() and selectAll() methods are mutally exclusive. Why do people ask for help and then disagree with the answer given?
    Thanks uncle_alice, I tried the code and it works.It amazes me that it took half an hour to "try" the code. Why not try the code first, ask a followup question later if it doesn't work? Why do we have to waste time resonding to a question twice, just to get you to try the code?

  • New at Java Swing, How to position cursor?

    I'm new at this, but I would like to know how to position a cursor in either a JTextField or JTextArea?
    Any help here would be appreciated.
    Tks Ran

    JTextField.setCaretPosition(newPosition);See also:
    http://java.sun.com/j2se/1.4/docs/api/javax/swing/text/JTextComponent.html#setCaretPosition(int)
    (sorry that the link doesn't work, but it's the forum, not the link... just browse downwards for setCaretPosition(int) )
    Cheers!

  • Position Cursor on Field

    Hi All,
    I have a requirement to check if the field Delivery Note has a value when doing goods receipt via MIGO or MIGO_GR. If this field has a value, the system should issue an error message and the cursoe should be positioned in that field so that the users will know that they need to fill it in. My question is how will I make the cursor go to that field given that this is not a required field in MIGO?
    Thanks,
    Jim

    hi,
    use set cursor field for that particular field in the program.
    regards,
    keerthi

  • List Output - how to position cursor back to Page 1, line 5, column 90.

    Hello,
    I have a report program that calculates and writes a Grand Total at the end of a multiple page report.
    The program can not calculate the Grand Total until the end of the program.  Pages are displayed as Subtotals are calculated. My user wants the Grand Total to also be displayed at the top of Page one.    I am able to write to any line and column position just fine using the Skip to Line command.
    But I can not find a way to return to Page 1 then write the value.  I have tried
    SCROLL LIST TO FIRST PAGE   and I have tried to reset the sy-pagno value prior to the write
    statement.   Is there a way to page back and write to a report list?
    Thanks
    MPersson

    Check this sample code:
    Here page no like 1 of totpage is inserted to top of every page. Similarly u can display total to each page.
    REPORT ZLTEST3 NO STANDARD PAGE HEADING
    LINE-COUNT 65
    LINE-SIZE 80.
    DATA: NUM_PAGES_C(10) TYPE C.
    PERFORM WRITE.
    PERFORM GET_TOTAL_PAGENO.
    TOP-OF-PAGE.
    WRITE:/(SY-LINCT) 'TEST - TEST' CENTERED.
    WRITE: / SY-DATUM, 60 SY-PAGNO,'of', '*****'.
    SKIP.
    *& Form WRITE
    text *
    --> p1 text
    <-- p2 text
    FORM WRITE.
    DO 200 TIMES.
    WRITE:/ 'TEST', SY-LINNO.
    ENDDO.
    ENDFORM. " WRITE
    *& Form GET_TOTAL_PAGENO
    text *
    --> p1 text
    <-- p2 text
    FORM GET_TOTAL_PAGENO.
    WRITE SY-PAGNO TO NUM_PAGES_C LEFT-JUSTIFIED.
    DO SY-PAGNO TIMES.
    READ LINE 2 OF PAGE SY-INDEX.
    REPLACE '*****' WITH NUM_PAGES_C INTO SY-LISEL.
    MODIFY LINE 2 OF PAGE SY-INDEX.
    ENDDO.
    ENDFORM. " GET_TOTAL_PAGENO
    Note : this method only works in foreground

  • Positioning Cursor in JTextArea

    Hi. Is there a method in JTextArea to scroll right up to the first character of the text? Whenever I set the text, the cursor scrolls all the way down to the last character. I'm only using JTextArea, not JEditorPane. Thanks.

    Oops - you said JTextArea, not JTextField - in that case:
      JTextArea ta = ...;
      ta.setText( "Eat Me" );
      ta.setCaretPosition( 0 );:)

  • Trouble positioning Cursor in Table Cell...

    Basically I have a left navigation table cell, and it
    includes many rows and an image in the cell.
    Well, I have to put this stupid "Authorize.net Verified
    Merchant" Seal in the Nav Cell. I want to put it at the
    bottom of the cell, underneat the red shield logo I made
    (see picture).
    The problem is that when I select the Horz and Vert for
    "Center", "Bottom" in Design View, the whole cell moves to the
    bottom. I just want to move the cursor down there so I can place
    the code for the Authorize.net Seal.
    http://www.blackreefdesigns.com/misc/example.png
    Please advise!

    <td width="164" height="195" align="left" valign="top"
    bgcolor="#333333"><table width="164" border="0"
    align="center" bordercolor="#CCCCCC">
    <tr>
    <td width="158" bgcolor="#CCCCCC"><div
    align="center" class="style28">PRODUCT
    CATALOG</div></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><div align="left"
    class="style7"><span class="style18"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=2">-
    AK</a></span></div></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><span class="style7"><a
    href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=4">-
    AR</a></span></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><span class="style7"><a
    href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=6">-
    FN/FAL</a></span></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=9"><strong>-
    HK</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=11"><strong>-
    SIG556</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=12"><strong>-
    SKS</strong></a></td>
    </tr>
    <tr bgcolor="#333333">
    <td> </td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=100"><strong>-
    CALIFORNIA COMPLIANT</strong></a></td>
    </tr>
    <tr bgcolor="#333333">
    <td> </td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=101"><strong>-
    RAILED FORENDS</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=13"><strong>-
    TACTICAL GEAR</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=7"><strong>-
    GUN CASES</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=14"><strong>-
    TACTICAL LIGHTS</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=87"><strong>-
    OPTICS &amp; MOUNTS</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=117"><strong>-
    NIGHT VISION</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=16"><strong>-
    HEARING &amp; EYE
    PROTECTION</strong></a></td>
    </tr>
    <tr bgcolor="#333333">
    <td> </td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=102"><strong>-
    MILITARY SURPLUS</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=103"><strong>-
    CLEARANCE</strong></a></td>
    </tr>
    <tr>
    <td bgcolor="#666666"><a href="
    http://www.adxtactical.com/store/pc/viewCategories.asp?idCategory=104"><strong>-
    MISC. PRODUCTS</strong></a></td>
    </tr>
    <tr bgcolor="#333333">
    <td> </td>
    </tr>
    <tr>
    <td bgcolor="#666666"><strong>- ADDAX GPU
    (COMING SOON)</strong></td>
    </tr>
    </table>
    <br>
    <table width="100%" border="0" align="left">
    <tr>
    <td><div align="center"><img src="logo.gif"
    width="160" height="230"></div></td>
    </tr>
    </table>
    <p align="center"> </p>
    </td>

  • XY graph cursor position bug

    I have reproduced the bug mentioned here:
    http://forums.lavag.org/Graph-Cursor-XY-Position-Bug-t1366.html&gopid=40859#entry40859
    I've reproduced this bug (?) in Labview 8.5, with an XY graph doing
    much the same as Jack. The attached zip file contains a stripped down
    version of my program (originally written by my coworker, Andrew
    MacDonald). Run "RENA3 Data Viewer.vi" and follow the instructions.
    As Jack said, changing Cursor.PosX to Cursor.Index solves the problem.
    I did not find this bug mentioned anywhere other than the above link.
    Fraser
    Attachments:
    XY Graph Cursor Bug.zip ‏142 KB

    Hi Karla,
    Sorry if that wasn't as obvious as I thought! :-)  Hopefully the attached image makes it clear.  On the front panel, 'Cursor Channel' is inputted.  This is directly wired to Histogram.Cursor.PosX.  Immediately following, Histogram.Cursor.PosX is read and wired to the front panel indicator 'Cursor.Cursor Position:Cursor X'.  There is always a difference of 15 or 16 between the two values.  If there was no bug, these two values should be identical!  I can only conclude that Labview is doing something funny...
    As I mentioned before, changing Cursor.PosX to Cursor.Index fixes the problem.
    A bit of background:  my FWHM function outputs the peak channel, and the cursor is supposed to go through the peak so you can have a visual check that it is analyzing the right peak.  I noticed that the line would never go through the peak; the line would always have an offset.  After wasting a couple of hours, it became clear that I was wiring the correct value into 'Cursor.PosX', but something was going wrong beyond that.
    Cheers,
    Fraser
    Message Edited by fjharris on 01-25-2008 11:34 AM
    Message Edited by fjharris on 01-25-2008 11:36 AM
    Attachments:
    Labview Bug.png ‏27 KB

  • How to get the cursor position from screen in module pool program

    Hi,
    I am doing the module pool program, I have one table control in one screen.
    I have to give functionality to the user that when the user enters first record in the table control and after filling the last field
    when he presses enter the cursor will have to come in the starting field of the second record.
    I know the logic , but i m bit confused.
    Can any body help me to solve this....
    thanks

    Hi,
    Check this code,
    Write it in the PBO
    MODULE SET_CURSOR_WERTKONTRAKT.
    MODULE SET_CURSOR_WERTKONTRAKT OUTPUT.
      PERFORM SET_CURSOR USING 'VBAP-ZWERT'.
    ENDMODULE.                 " SET_CURSOR_WERTKONTRAKT  OUTPUT
    FORM SET_CURSOR USING US_FELDNAME.
      DATA: DA_TFILL LIKE SY-TFILL.
      DESCRIBE TABLE IVBAP LINES DA_TFILL.
    FCODE 'Create Position':
    ==> Cursor to the first free line set to make the new position
    Can be created directly
        IF DA_TFILL EQ 0.
          SET CURSOR FIELD US_FELDNAME LINE 1.   -> set cursor position
        ELSE.
          SET CURSOR FIELD US_FELDNAME LINE 2.
        ENDIF.
    Product proposal actively
    Set ==> cursor in the first row
      IF DPP_ACTIVE   EQ CHARX AND
         XVBAP_UMFANG_OPV IS INITIAL.
    in the 'target volume' if available
        IF KOPGR_MIT_ZMENG CS TVAK-KOPGR.
            SET CURSOR FIELD 'VBAP-ZMENG' LINE 1.
            EXIT.
        ELSE.
    Else in the field 'Order quantity'
          SET CURSOR FIELD 'RV45A-KWMENG' LINE 1.
          EXIT.
        ENDIF.
      ENDIF.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Programmatically disabling/enabling cursor in intensity graph

    Hello all,
    I am building a LV interface (LV2011) for a stepper XY stage.  The system "scans" a surface, displaying it on the graph.  I set up to cursors to zoom into a region of interest (ROI).  Pressing a button resizes the scales to the ROI (zooming in on the area).  Sections of code move the XY stage, and read a device.  When done I want to zoom into a ROI and use a THIRD cursor to manually move the XY stage.  I have this working with TWO graphs, based on the "region of interest.vi" I found in the dev zone.  
    What I would like to do is have a boolean toggle controlling ONE GRAPH between setting min/max (cursors 0 and 1) and manual stepper position (cursor 2).  If cursor 2 is visible I want cursors 0 & 1 not showing and visa versa. Can I do this?
    I attached the example - bascially what I did was add a cursor to the 2nd graph, grabbing the XY vales and sending to the stepper controllers. Works great!  I am trying to "combine the two" by resizing the orig graph with a button click (works fine) and then click another button to show the XY stage cursor (and hiding the min/max cursors) - thats the brick wall
    On a seond note - controlling a XY stage using the intensity graph's cursor is really nice; however it would be great if I can control the cursor similar to a slider's "coerce" - has anyone done this?  I assume I have to write a routine in the event that performs some modulo function. Just curious!
    Thanks,
    Steve
    Solved!
    Go to Solution.
    Attachments:
    roi.llb ‏40 KB

    Your exmaple works perfect. Howver I am having probs with Val(sngl) on the XY graph.  On the example you gave, lets say I move the cursor with the mouse - event fires, everyone is happy. If I move the cursor with CODE - nada.  I even read the "Value" of the graph and wrote it to "Val(sngl)" to try to fire the event.  How does one force a trigger on an XY chart when you move a cursor (say cursor idx2) using code?
    Better yet - why when I read the Val and write to Val(sngl) does the event not fire??? I have been searching for a basic XY table with sensor -type project but havent found one yet.  Everyting works great - draginng the cursor moves the XY stage. Now I need to do the auto-scan part  Use code to place the cursor - trigger the even that moves the stage.
    Thanks
    Steve
    Attachments:
    XY_Stage_Rev8.vi ‏53 KB

Maybe you are looking for