How to set cursor at the end of text item?

If I use Go_Item, it will go to the item but select the whole content of the item(displayed in blue color). How can I set the cursor at the end of the text item and not to make the content selected?

You may be seeing <Bug:1186653> which is fixed in 6.0.5.36 however if running on windows awprkaoutnd may be to use d2kwutil.
Place the following code within a when-new-item-instance trigger on the
item(s) you wish to disable highlighting:
DECLARE
v_handle pls_integer;
BEGIN
win_api_shell.sendkeys(V_HANDLE,'{home}',FALSE);
END;
The above code will result in no highlighting occurring and the cursor will be
placed on the first character of the item. If you wish the cursor to appear at
the end of the item, replace the word home to end. For more information,
please refer to the d2kwutil documentation.
Note that this solution will only work on windows in a client server environment.
For a web solution you will have to create a java bean that will perform the
necessary functionality.
Regards
Grant Ronald

Similar Messages

  • How to set cursor in the beginning of a test in a JTextField in Java Swings

    hi
    I am new to Swing.I have to display a large text in a text field.Whenever I am displaying it is showing the tale of the text.To see the beginning of the text I have to move the cursor using keys.How can I set the cursor in the beginning of the text or how can I display the text with its beginning characters.

    You're practically there...
    You usually put all the jars in the same directory and then specify the class-path attribute in your manifest:
    Class-Path: other.jarYou can of course specify a relative path to another jar:
    Class-Path: lib/other.jarBut that's up to you how you want to package these things.
    I don't think that jars in jars are permitted.
    Hope this helps.

  • How to set cursor at the first line in a table control?

    Hi,
           I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
    SET CURSOR FIELD P9417-ZCOUNTRY LINE 1.  ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
    Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. Thanks

    I have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
    if sy-ucomm = 'INSERT'.
    set cursor 'P9714-ZCOUNTRY'  line 1.
    else if sy-ucomm eq 'CHANGE'.
    describe table itab lines fill.
    fill = fill + 1.
    set cursor 'P9714-ZCOUNTRY'  line fill.
    endif.
    I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
    Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
    Thanks in advance..good answers will be rewarded.
    Mahesh

  • Alv grid: how to set cursor to the next field

    Hi Abapers,
    When I input the data in first cell and do a tab for coming to next cell to give the input it is coming back to my first cell in the ALV grid.
    Any idea's on how do I deal with this.
    Many Thanks,
    Jagan.

    Hi Group,
    Finally I got the solution for this, here is the stuff we need to do:
    ***********04/03/2010
    *----Get the current cell
                CALL METHOD wa_grid->get_current_cell
                  IMPORTING
                    es_col_id = li_col
                    es_row_no = li_rows.
    **--Get Scroll Position
                CALL METHOD wa_grid->get_scroll_info_via_id
                  IMPORTING
                    es_col_info = ls_col
                    es_row_no   = ls_num.
    ***********04/03/2010
                CALL METHOD wa_grid->refresh_table_display.
               CLEAR: wa_profile1.     ", wa_pro_new.
    ********04/03/2010
    *--Set Scroll Position
                CALL METHOD wa_grid->set_scroll_info_via_id
                  EXPORTING
                    is_col_info = ls_col
                    is_row_no   = ls_num.
    *----Set the cell information
                ls_row-index = li_rows-row_id.
                CALL METHOD wa_grid->set_current_cell_via_id
                  EXPORTING
                    is_row_id    = ls_row
                    is_column_id = li_col
                    is_row_no    = li_rows.
    ********04/03/2010
    Hope this info might be useful to anyone facing the similar issue.
    Cheers,
    Jagan.

  • How to position the cursor at the end of the text with EDIT_TEXT?

    Hello, it wanted to ask to them if somebody could make work the module of function EDIT_TEXT so that it positions the cursor at the end of the text that is visualizing in the text editor. In the documentation it says that passing a ' X' to him in the field scrollend of the parameter Control is obtained that operation. Nevertheless, I did this and the cursor continues appearing at the beginning of the text that visualizes.
    Somebody could help me please?
    Regards,
    Gabriel
    PD: The code that I use is the following one:
    FORM f_ingresar_comentarios.
    DATA: l_action,
    l_result LIKE itcer,
    l_pedido LIKE thead-tdname,
    li_coment_save LIKE i_comentarios OCCURS 0,
    li_coment_aux LIKE i_comentarios OCCURS 0 WITH HEADER LINE,
    l_lines TYPE i,
    l_lines_save TYPE i,
    l_lines_insert TYPE i,
    l_index TYPE i,
    l_index_aux TYPE i,
    l_insert,
    lwa_control LIKE itced.
    CLEAR: l_action.
    CLEAR i_comentarios.
    REFRESH: i_comentarios,
    li_coment_save,
    li_coment_aux.
    l_pedido = v_pedido.
    Leemos el texto si es que existe
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    client = sy-mandt
    id = v_id_text
    language = sy-langu
    name = l_pedido
    object = c_ekko
    IMPORTING
    header = wa_cabecera
    TABLES
    lines = i_comentarios "Lineas de texto leídas
    EXCEPTIONS
    id = 1
    language = 2
    name = 3
    not_found = 4
    object = 5
    reference_check = 6
    wrong_access_to_archive = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    Armamos la cabecera por primer comentario para el pedido
    CLEAR wa_cabecera.
    wa_cabecera-tdobject = c_ekko. "Objeto en tabla TTXID
    wa_cabecera-tdname = v_pedido. "Nro de pedido
    wa_cabecera-tdid = v_id_text. "ID en tabla TTXID
    wa_cabecera-tdspras = sy-langu. "Lenguaje
    wa_cabecera-tdlinesize = 70.
    ENDIF.
    Salva comentarios originales
    li_coment_save[] = i_comentarios[].
    lwa_control-scrollend = c_x. " c_x = 'X'
    Abre el editor de texto
    CALL FUNCTION 'EDIT_TEXT'
    EXPORTING
    header = wa_cabecera
    save = space
    control = lwa_control
    IMPORTING
    newheader = wa_cabecera
    function = l_action
    RESULT = l_result
    TABLES
    lines = i_comentarios
    EXCEPTIONS
    object = 1
    id = 2
    language = 3
    name = 4
    linesize = 5.
    Si cambio los comentarios, actualiza comentarios
    CASE l_action.
    WHEN c_unchanged.
    WHEN c_delete.
    WHEN c_update OR
    c_insert.
    Obtiene cantidad de lineas de comentarios originales y modificados
    DESCRIBE TABLE li_coment_save LINES l_lines_save.
    DESCRIBE TABLE i_comentarios LINES l_lines.
    Si se insertaron lineas...
    IF l_lines > l_lines_save.
    Calcula cantidad de lineas a insertar para luego calcular valor de
    indice a partir del cual insertar los nuevos comentarios
    l_lines_insert = l_lines - l_lines_save.
    l_index = ( l_lines - l_lines_insert ) + 1.
    Controla que al menos una de las lineas insertadas sea diferente de
    blanco
    l_index_aux = l_lines.
    l_insert = c_n.
    DO l_lines_insert TIMES.
    READ TABLE i_comentarios INDEX l_index_aux.
    IF sy-subrc = 0 AND
    i_comentarios-tdline <> space.
    l_insert = c_s.
    EXIT.
    ENDIF.
    l_index_aux = l_index_aux - 1.
    ENDDO.
    IF l_insert = c_s.
    Carga comentarios originales y agrega lineas insertadas
    li_coment_aux[] = li_coment_save[].
    APPEND LINES OF i_comentarios
    FROM l_index
    TO l_lines
    TO li_coment_aux.
    Setea variable para indicar actualizacion de comentarios.
    v_comentario = 'S'.
    Agrega usuario y fecha del comentario
    CONCATENATE sy-uname
    sy-datum
    INTO li_coment_aux-tdline
    SEPARATED BY space.
    li_coment_aux-tdformat = '*'.
    APPEND li_coment_aux.
    Grabamos el texto
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    client = sy-mandt
    header = wa_cabecera
    savemode_direct = c_x
    IMPORTING
    newheader = wa_cabecera
    TABLES
    lines = li_coment_aux
    EXCEPTIONS
    id = 1
    language = 2
    name = 3
    object = 4
    OTHERS = 5.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDCASE.
    ENDFORM. " f_ingresar_comentarios
    In addition, I made another program simpler that it uses the same functions and also have the same problem:
    *& Report Y_GVA_TEXT *
    REPORT y_gva_text .
    DATA: wa_cabecera LIKE thead,
    i_comentarios LIKE tline OCCURS 0 WITH HEADER LINE.
    DATA: l_action,
    v_comentario,
    l_result LIKE itcer,
    v_pedido LIKE thead-tdname VALUE '3',
    l_pedido LIKE thead-tdname,
    c_a05 LIKE thead-tdid VALUE 'A05',
    c_ekko LIKE stxh-tdobject VALUE 'EKKO',
    l_lines LIKE sy-tabix,
    lwa_control LIKE itced.
    CONSTANTS: c_x VALUE 'X',
    update VALUE 'U', "Langtext verändert
    insert VALUE 'I', "Langtext eingefügt
    delete VALUE 'D', "Langtext gelöscht
    modify VALUE 'M', "Kein Langtext, Inlinezeile veränd.
    unchanged VALUE ' '.
    CLEAR: l_action.
    CLEAR i_comentarios.
    REFRESH i_comentarios.
    Leemos el texto si es que existe
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    client = sy-mandt
    id = c_a05
    language = sy-langu
    name = v_pedido
    object = c_ekko
    IMPORTING
    header = wa_cabecera
    TABLES
    lines = i_comentarios "Lineas de texto leídas
    EXCEPTIONS
    id = 1
    language = 2
    name = 3
    not_found = 4
    object = 5
    reference_check = 6
    wrong_access_to_archive = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    Armamos las cabecera para mostrar los comentarios
    CLEAR wa_cabecera.
    wa_cabecera-tdobject = c_ekko. "Objeto en tabla TTXID
    wa_cabecera-tdname = v_pedido. "Nro de pedido
    wa_cabecera-tdid = c_a05. "ID en tabla TTXID
    wa_cabecera-tdspras = sy-langu. "Lenguaje
    wa_cabecera-tdlinesize = 70.
    ENDIF.
    lwa_control-noendlines = c_x.
    lwa_control-scrollend = c_x.
    Abre el editor de texto
    CALL FUNCTION 'EDIT_TEXT'
    EXPORTING
    header = wa_cabecera
    save = space
    control = lwa_control
    IMPORTING
    newheader = wa_cabecera
    function = l_action
    RESULT = l_result
    TABLES
    lines = i_comentarios
    EXCEPTIONS
    object = 1
    id = 2
    language = 3
    name = 4
    linesize = 5.
    Si cambio los comentarios, actualiza comentarios
    CASE l_action.
    WHEN unchanged.
    WHEN delete.
    WHEN update OR
    insert.
    Agrega usuario y fecha del comentario
    CONCATENATE sy-uname
    sy-datum
    INTO i_comentarios-tdline
    SEPARATED BY space.
    i_comentarios-tdformat = '*'.
    APPEND i_comentarios.
    CALL FUNCTION 'SAVE_TEXT'
    EXPORTING
    header = wa_cabecera
    IMPORTING
    newheader = wa_cabecera
    TABLES
    lines = i_comentarios.
    ENDCASE.

    Murugesh,
    I believe that you have mis-read Gabriel's problem.
    Gabriel,
    The cursor is not positioning at the base of the editor as you have cited.
    In order to get this functionality to work, you must set the LINE_EDITOR import paramter to 'X'.
    data: hdr like THEAD.
    data: l_itced like itced.
      hdr-tdobject = 'VBBP'.
      hdr-tdname = '4000029521000030'.
      hdr-tdid = 'Z005'.
      hdr-tdspras = 'E'.
      hdr-TDLINESIZE = '100'.
      hdr-TDTXTLINES = '3'.
      l_itced-SCROLLEND = 'X'.
      CALL FUNCTION 'EDIT_TEXT'
        EXPORTING
        DISPLAY             = ' '
        EDITOR_TITLE        = ' '
          HEADER              = hdr
        PAGE                = ' '
        WINDOW              = ' '
        SAVE                = 'X'
          LINE_EDITOR         = 'X'   " here !!!
          CONTROL             = l_itced
        PROGRAM             = ' '
        LOCAL_CAT           = ' '
      IMPORTING
        FUNCTION            =
        NEWHEADER           =
        RESULT              =
        TABLES
          LINES               = lines
      EXCEPTIONS
        ID                  = 1
        LANGUAGE            = 2
        LINESIZE            = 3
        NAME                = 4
        OBJECT              = 5
        TEXTFORMAT          = 6
        COMMUNICATION       = 7
        OTHERS              = 8
    Don't forget those points !!

  • How to highlight a line in a text stream and position the cursor at the end.

    I would like to select a line in a text control data stream, highlight the text, and place the cursor at the end of the line so that the text control can be edited at that point.

    Depends on what you mean by "highlight". If you mean highlight in the sense of when you use the mouse to select text, then you can't do that and then place the cursor at the end, since that would effectively "unhighlight" the text. You need to use a different kind of "highlight", like turning the text bold or something. This KB article talks about highlighting particular characters: How Do I Highlight Particular Characters in a String Control?
    See attached for simple example. Modify as needed.
    Attachments:
    Text Select.vi ‏19 KB

  • Setting the cursor at the end of a text item Forms 10g

    Is there a way in 10g forms to set the cursor at the end of the text item without highlighting the text.
    I have a text item field when I query it and tab to the field, it highlights the whole text inside the block item. Users sometimes type without thinking so, we made it set the cursor at the end.
    I know in 6i forms there was a client package (d2kwutil) that accomplished this and if I have too, I'll use it via the WebUtil. I just was not sure if there was anything in 10g forms that accomplished the same task.
    Any help is appreciated.
    Chris

    Hello,
    You can also use the good old win_api_shell.sendkeys() d2kwutil function, that works also fine with Web versions.
    For instance, in a When-New-Item-Instance trigger:
    win_api_shell.sendkeys(get_window_property('WINDOW1',window_handle),'{End}',TRUE); Francois

  • REGARDING position the cursor at the end of the field

    i friends,
    i have a field having length of 20 ,i need to place the cursor at the end of the filed means at the 20 th position the cursor must be there how will i acieve this...plz help me the value which i will pass to this field is may be of character 4 ,5 what ever but the cursor will be always at the 20th position or at the end of the filed plz help me.......

    parameters:pa_str(20) type c default '11111111111111111111' .
    initialization.                   .
    Set cursor field 'PA_STR' offset 20.

  • How to get the focus at the end of text ?

    I am having applet with awt TextField component and some default text. (MSQ-)
    To have a focus to text field I am using :
    refnoTextField.requestFocus();
    But this gives focus at the biginning and not at the end of text. I want the focus at the end (i.e. after MSQ-)
    How to get the focus at the end of text ?
    any help ?
    manisha
    manisha

    public void focusGained(FocusEvent e) {
         if (e.getSource() == yourtextbox) {
         yourtextbox.setSelectedEnd(yourtextbox.getLength());
    try this thing - not sure if it'll work, but I figgured out how to apply it to my textareas for keeping the focus on the last line of the textarea..it might work for your textboxes..
    shrug

  • How to add spaces at the end of record

    Hi Friends,
    i am creating a file which contains more than 100 records.
    In ABAP i have internal table with on field(135) type c.
    some time record have length 120, somtime 130 its vary on each record.
    but i would like to add space at the end of each record till 135 length.
    Can you please help me how to add speace at the end of record.
    regards
    Malik

    So why did you said that in your first posting? My glass sphere is out for cleaning...
    Instead of type c use strings and add spaces until they have the appropriate length.
    loop at outtab assigning <pout>.
      while strlen( <pout>-val ) < 135.
        concatenate <pout>-val `` into <pout>-val.
      endwhile.
    endloop.

  • In Photoshop Elements 7, how do I free up the ends of a crop box independently?

    In Photoshop Elements 7, how do I free up the ends of a crop box independently?
    I require the end points to move independently to fit am image crop

    Thanks.
    You have helped tremendously!

  • How to set and retrive the index log path stored by parameter LOG_DIRECTORY

    how to set and retrive the index log path stored by parameter LOG_DIRECTORY.

    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/lsnrctl.htm#sthref72
    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/cmctl.htm#sthref239

  • How to set values to the structure containing a node with cardinality 0..n

    Hello.
    I 'm trying to set values for the node with cardinality 0..n. The node type is "Fields".
    <xsd:complexType name="Field">
       <xsd:sequence>
          <xsd:element name="fieldCode" type="xsd:string"></xsd:element>
          <xsd:element name="displayValue" type="xsd:string" minOccurs="0"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Fields">
       <xsd:sequence>
          <xsd:element name="field" type="tns:Field" minOccurs="0" maxOccurs="unbounded"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    I  need to set several values for the element "fieldCode" but it has cardinality 0..1 and BPM does not allow it but I did not find any option about how to set values for the structure of type "Fields". Could you help me?
    Best regards,
    Timur Semenchuk

    Hi Marcus,
    If there is no way you could change the cardinality of the node, and thus it can contain 0..n items, I think you should create-and-add a new element programmatically.
    Since the collection can contain zero elements, I would add a 'new' button, which upon clicking adds one new element via:
    IYourNodeElement yourNodeElem = wdContext.nodeYourNode().createYourNodeElement();
    wdContext.nodeYourNode().addElement(yourNodeElem);
    Hope this explains a bit!
    Best,
    Robin van het Hof

  • Does anyone know how to set alerts in the iCloud calendar of Outlook 2010 for PC?

    Does anyone know how to set alerts in the iCloud calendar on Microsoft Outlook 2010 for a PC?  Outlook gives me a warning message and does not allow me to save alerts for calendar events created in iCloud calendar.  It will allow me to save events in the non-iCloud calendars.

    Ignore what office says, when the warning comes up saying that the reminder will not work click on yes,
    I just tested it and i had the reminder on my ihpone in outlook and also as i had the calendar open in safari it popped up on there too ( I wasn't aware it did that)

  • How to set focus on the last row of JTextPane

    how to set focus on the last row of JTextPane?
    import javax.swing.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyGUITest extends JPanel implements ActionListener
    {   public static void main(String[] args)
        {   SwingUtilities.invokeLater(new Runnable()
             {   public void run()
              {    JFrame f = new JFrame("My GUI");
                  MyGUITest GUI = new MyGUITest();
                  GUI.setOpaque(true);
                  f.setContentPane(GUI);
                  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  f.pack();
                  f.setLocationRelativeTo(null);
                  f.setVisible(true);
        JTextPane txtP;
        JButton add;
        HTMLEditorKit hek;
        HTMLDocument hd;
        String txt;
        MyGUITest()
        {     this.setLayout(new BorderLayout());
         this.setPreferredSize(new Dimension(400,200));
         txtP = new JTextPane();
         txtP.setEditable(false);
         txtP.setContentType("text/html");
         txtP.setText("");
         hek = new HTMLEditorKit();
         txtP.setEditorKit(hek);
         hd = new HTMLDocument();
         txtP.setDocument(hd);
         JScrollPane sTxtA = new JScrollPane(txtP);
         add = new JButton("add");
         add.addActionListener(this);
         sTxtA.setBorder(BorderFactory.createTitledBorder(""));
         this.add(sTxtA, BorderLayout.CENTER);
         add(add, BorderLayout.SOUTH);
         new Thread(new Runnable()
         {   public void run()
             {   while(true)
              {   try
                  {     Thread.sleep(100);
                  }catch(InterruptedException ex)
                  {     ex.printStackTrace();
                  appendText("This is <b>HTML</b> text");
                  //add.doClick();
         }).start();
        public void actionPerformed(ActionEvent e)
        {     txt = "<b>asd</b>";
         try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
        public void appendText(String txt)
        {     try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
    }thanks~

    anIdiot wrote:
    im not sure what is the caret location...So don't youthink you should have looked for it in the API?
    anyway, i want the scroll bar to scrolled down automatically when the output is displayed.
    normally, the scroll bar is scrolled down automatically when a new text is inserted, but it doesnt work on this timeGo through camockr's http://tips4java.wordpress.com/2008/10/22/text-area-scrolling/
    db

Maybe you are looking for

  • Oracle.jbo.RowCreateException: JBO-25017: Error while creating a entity row

    Hi all, I'm new to OAF, I have created a Page, In that i have an LOV to a Message Text input box and it returns values to another 6 text boxes from my custom table(1). and in the same page i have some radio buttons also check boxes and "save","cancel

  • Login and bulletin board

    I am in the process of redesigning our intranet. How hard is it to have a login to a part of this site? What I am hoping to do is to create a bulletin board for employees, but not everyone would see it. There would also be documents posted within thi

  • Cannot copy file: The specified network name is no longer available

    After several tries stretching over weeks or months, I finally solved this problem. Internet sharing and transferring small files worked fine over the wireless network, but files over about 50 - 100 MB would fail giving the message "Cannot copy : The

  • This script how to ensure two conditions

    page number pairs and object style how do you spell var d = app.activeDocument;     for(i = 0; i < d.pages.length; +2) {         p = d.pages.item(i);         if(p && p.isValid) { pi = p.pageItems; for(k = 0; k < pi.length; ++k) {    it = pi[k];      

  • Why does not sync folder work?

    Hi, Running Lightroom 5.5. I am in folder Dress.  I export picture Dress 001.nef to a jpg.  To the same folder.  It does not show up. I then select sync folder, the jpg picture does not show up???? I go to show folder in explorer.. It show Dress 001.