"description" text always show

dear all expert.
i have a little problem with my alv
in subtotal why always show "description" in my field catalog i don't write "description"
i don't know how to remove it, i just want to show the real fieldcat without "description"
here is the screen shoot
[IMG]http://i40.photobucket.com/albums/e227/indra_jale/shootdescription.jpg[/IMG]
please help me to remove the "description"

Hi
Check this code that how to change sub-total test
REPORT  zfi006_positive_pay_file NO STANDARD PAGE HEADING.
DATA:  gt_bdcdata    TYPE STANDARD TABLE OF bdcdata,
       gt_bdcmsgcoll TYPE STANDARD TABLE OF bdcmsgcoll,
       gs_bdcdata    TYPE bdcdata,
       gv_src_dir    TYPE char80s,
       gv_tgt_dir    TYPE char80s,
       gv_filename   TYPE char80s,
       gv_stat       TYPE success_flag,
       gv_command    TYPE char05,
       gv_cnt     TYPE i,
       gv_flag    TYPE c.
Variables declaration
DATA : gs_reclist    TYPE somlreci1,
       gs_t042i      TYPE typ_t042i.
DATA: gt_alv_fieldcat   TYPE slis_t_fieldcat_alv,
      gs_alv_layout     TYPE slis_layout_alv,
      gt_alv_sort       TYPE slis_t_sortinfo_alv,
      gt_alv_events     TYPE slis_t_event,
      gs_alv_print      TYPE slis_print_alv,
layout set before selection-screen
  PERFORM get_default_variant USING 'NORM'
                              CHANGING gs_alv_variant p_vari.
START-OF-SELECTION event
START-OF-SELECTION.
Do validation
  PERFORM do_filepath_validation.
Refresh all global data
  PERFORM refresh_global_data.
Collect data
  PERFORM collect_data_from_t042i.
Process table gt_t042i and calling standard RFCHKE00 program
  PERFORM process_data_to_rfchke00.
Processing report display into alv list
  PERFORM report_data_to_final.
Alv Field Cata-log declaration
  PERFORM set_field  CHANGING gt_alv_fieldcat.
  PERFORM set_layout CHANGING gs_alv_layout.
  PERFORM set_sort   CHANGING gt_alv_sort.
  PERFORM set_event  CHANGING gt_alv_events.
Calling the ALV list display FM by passing the values
  PERFORM process_alvlistdata_to_spool.
Sending an email attachment to paramount accounts payable
  PERFORM listoutput_to_mail.
*&      Form  SET_FIELD
    Define fieldcat of Final table
FORM set_field  CHANGING p_alv_fieldcat TYPE slis_t_fieldcat_alv.
Define fieldcat of Final table
  DATA ls_fieldcat TYPE slis_fieldcat_alv.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'UBHKT'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 14.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-003.
  ls_fieldcat-reptext_ddic = text-003.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'UBHKT1'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 14.
  ls_fieldcat-no_out       = 'X'.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-003.
  ls_fieldcat-reptext_ddic = text-003.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'UBHKT2'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 14.
  ls_fieldcat-no_out       = 'X'.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-003.
  ls_fieldcat-reptext_ddic = text-003.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'CHECT'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 13.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-004.
  ls_fieldcat-reptext_ddic = text-004.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'ZALDT'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 10.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-005.
  ls_fieldcat-reptext_ddic = text-005.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'CHK_SEQ'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 7.
  ls_fieldcat-no_out       = 'X'.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-018.
  ls_fieldcat-reptext_ddic = text-018.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'RWBTR'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 18.
  ls_fieldcat-do_sum       = 'X'.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-006.
  ls_fieldcat-reptext_ddic = text-006.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'VOIDD'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 6.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-007.
  ls_fieldcat-reptext_ddic = text-007.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'ZNME1'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 35.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-008.
  ls_fieldcat-reptext_ddic = text-008.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'ZBUKR'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 12.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-009.
  ls_fieldcat-reptext_ddic = text-009.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'LIFNR'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 10.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-010.
  ls_fieldcat-reptext_ddic = text-010.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  CLEAR ls_fieldcat.
  ls_fieldcat-fieldname    = 'COUNT'.
  ls_fieldcat-tabname      = gc_tab_final.
  ls_fieldcat-outputlen    = 15.
  ls_fieldcat-do_sum       = 'X'.
  ls_fieldcat-seltext_l    = ls_fieldcat-seltext_m = text-s03.
  ls_fieldcat-reptext_ddic = text-s03.
  APPEND ls_fieldcat TO p_alv_fieldcat.
  gv_repid = sy-repid.
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
      i_program_name     = gv_repid
      i_internal_tabname = gc_tab_final
      i_structure_name   = ' '
    CHANGING
      ct_fieldcat        = p_alv_fieldcat[].
ENDFORM.                    " SET_FIELD
*&      Form  SET_LAYOUT
FORM set_layout  CHANGING p_alv_layout TYPE  slis_layout_alv.
  p_alv_layout-zebra             = ' '.
  p_alv_layout-detail_popup      = 'X'.
  p_alv_layout-group_change_edit = 'X'.
ENDFORM.                    " SET_LAYOUT
*&      Form  SET_SORT
   Sorting ALV data based on fields
FORM set_sort  CHANGING p_alv_sort TYPE slis_t_sortinfo_alv.
  DATA : ls_hlp_sort TYPE slis_sortinfo_alv.
  ADD 1 TO   ls_hlp_sort-spos .
  ls_hlp_sort-fieldname = 'UBHKT1'.
  ls_hlp_sort-tabname = 'GT_FINAL'.
  ls_hlp_sort-subtot    = 'X'.
  ls_hlp_sort-up        = 'X'.
  APPEND ls_hlp_sort TO p_alv_sort.
  ADD 1 TO   ls_hlp_sort-spos .
  ls_hlp_sort-fieldname = 'CHK_SEQ'.
  ls_hlp_sort-tabname = 'GT_FINAL'.
  ls_hlp_sort-subtot    = 'X'.
  ls_hlp_sort-up        = 'X'.
  APPEND ls_hlp_sort TO p_alv_sort.
ENDFORM.                    " SET_SORT
*&      Form  SET_EVENT
   Events passing to ALV Function module parameters
FORM set_event  CHANGING p_alv_events TYPE slis_t_event.
  DATA ls_events TYPE slis_alv_event .
  REFRESH p_alv_events.
  CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
      i_list_type     = 4
    IMPORTING
      et_events       = p_alv_events
    EXCEPTIONS
      list_type_wrong = 0
      OTHERS          = 0.
  READ TABLE p_alv_events  INTO ls_events
                    WITH KEY name = slis_ev_top_of_page.
  IF sy-subrc = 0.
    MOVE gc_top_of_page TO ls_events-form.
    MODIFY p_alv_events FROM ls_events INDEX sy-tabix.
  ENDIF.
  READ TABLE p_alv_events  INTO ls_events
                    WITH KEY name = slis_ev_subtotal_text.
  IF sy-subrc = 0.
    MOVE gc_formname_subtotal_text TO ls_events-form.
    MODIFY p_alv_events FROM ls_events INDEX sy-tabix.
  ENDIF.
  READ TABLE p_alv_events  INTO ls_events
                     WITH KEY name = slis_ev_after_line_output.
  IF sy-subrc = 0.
    MOVE gc_after_line_output TO ls_events-form.
    MODIFY p_alv_events FROM ls_events INDEX sy-tabix.
  ENDIF.
ENDFORM.                    " SET_EVENT
*&      Form  subtotal_text
      Build subtotal text
      P_total  Total
      p_subtot_text Subtotal text info
FORM subtotal_text CHANGING
               p_total TYPE any
               p_subtot_text TYPE slis_subtot_text.
Check_seq level sub total
  IF p_subtot_text-criteria = 'CHK_SEQ'.
    p_subtot_text-display_text_for_subtotal
    = '                        CHK-SEQ TOTAL'(s01).
  ENDIF.
Account number level sub total
  IF p_subtot_text-criteria = 'UBHKT1'.
    p_subtot_text-display_text_for_subtotal
    = '                           ACCT TOTAL'(s02).
  ENDIF.
ENDFORM.                    "subtotal_text
*&      Form  AFTER_LINE_OUTPUT
  ALV The actual subtotalu2019s output is created using
   the WRITE and FORMAT statements.
FORM after_line_output
  USING p_rs_lineinfo TYPE slis_lineinfo.
Declaration of local variables
  DATA: lv_total_amount TYPE wrbtr,     "Total For Successful Entries
        lv_count   TYPE i,
        lv_lines   TYPE i.
Getting No. of Lines in the table GT_FINAL
  DESCRIBE TABLE gt_final LINES lv_lines.
Displaying the totals after the last record of the internal
table T_OUTPUT
  IF p_rs_lineinfo-tabindex = lv_lines.
    gv_flag  = 'X'.
  ENDIF.
  IF gv_flag = 'X'.
    IF gv_cnt <> '3'.
      gv_cnt = gv_cnt + 1.
    ENDIF.
    IF gv_cnt = '3'.
      LOOP AT gt_final INTO gs_final.
        lv_total_amount =    lv_total_amount + gs_final-rwbtr.
        lv_count = lv_count + 1.
      ENDLOOP.
  Set format for the total line display
      ULINE AT (p_rs_lineinfo-linsz).        "Dynamic Line Size
      FORMAT INTENSIFIED COLOR COL_TOTAL ON. "Setting the color
      "For the total row
      "As Yellow
      WRITE : /    sy-vline,                 "Vertical Line
                   text-s04,                 "Caption For Total
                   33 lv_total_amount.       "Total Of
      POSITION     p_rs_lineinfo-linsz.      "Dynamic Line Size
      WRITE :      sy-vline.                 "Vertical Line
      ULINE AT     (p_rs_lineinfo-linsz).    "Dynamic Line Size
      WRITE : /    sy-vline ,                "Vertical Line
                   text-s05,                 "Caption For Total
                   33 lv_count.
      POSITION     p_rs_lineinfo-linsz.      "Dynamic Line Size
      WRITE :      sy-vline.                 "Vertical Line
      FORMAT COLOR OFF.                      "Color Setting Off
    ENDIF.
  ENDIF.
ENDFORM.                    "AFTER_LINE_OUTPUT
Display output
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_callback_program = gv_repid
      is_layout          = gs_alv_layout
      is_variant         = gs_alv_variant
      it_fieldcat        = gt_alv_fieldcat
      it_sort            = gt_alv_sort
      it_events          = gt_alv_events
    TABLES
      t_outtab           = gt_final[]
    EXCEPTIONS
      program_error      = 1
      OTHERS             = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
ENDFORM.                    " LISTOUTPUT_TO_MAIL

Similar Messages

  • Conditional text always shows when open file in FM12

    I have numerous files with contional text that appears if a certain condition is met.
    Now in FM12 (on Windows 7) when I open those files the text appear even if the condition is  not met. It disappears if I apply the conditions but it will reappear if I close the file and reopen it.
    Any ideas as to why this behaviour.
    I am moving those files from FM10 to FM12.
    Thansk
    Pierre

    Do you actually save the file before you close it? If not, then the conditions that you have aplied are back to the way they were when you re-open the file.
    If you do save (which I'm assuming that you do), then there may be some internal garbage in the file (especially if you've imported any content from other applications like Word). You could try a MIFwash, i.e. save the file as MIF, then open the MIF version and re-save as .fm file.

  • I cannot get icons only on my bookmarks toolbar. Text always shows.

    I transferred all my files and desktop from an older mac. I had downloaded an 'icons only'bookmarks toolbar as an add on, which I loved. This toolbar did not move as icons only, and is no longer available as a download. It looks like icons only is now firefox default for a bookmarks toolbar, but mine is stuck on icons+text. I have followed your instructions to customize toolbar, but nothing changes. I have also tried restore defaults and nothing changes. I would like to remove this old toolbar and start over with your icons only in 6.0, but cannot figure out how to do it.

    Look at:
    *Roomy Bookmarks Toolbar: https://addons.mozilla.org/firefox/addon/roomy-bookmarks-toolbar/

  • Showing Description text

    Hi All
    I have a report with columns PRODUCT NUMBER (from Product Master data), PRODUCT DESCRIPTION (from Product text table) AND SALES AMOUNT
    The report shows the title Product Number and Sales Amount, but not the title for Production Description. Is there a way for me to either hardcode it, or get that title to show?
    This is what I mean:
    Product Number
    xyz
    zbc
    etc
    cpu
    monitor
    box
    Sales Amount
    500   
    200
    50
    I want the "Product Description" title to show up above CPU, instead of the blank.
    Please help!
    Thanks!
    Pooja.

    Hi Pooja,
    Couple of options:
    1. Type it in and save the workbook.
    2. Write a VB macro to place the words in the specified cell
    3. Make the description as an attribute of Product Number and then display the attribute in the report.
    Hope this helps...

  • When i go to new sms typing their is always show a text, how can solve this problem?

    when i go to new sms typing their is always show a text, how can solve this problem?

    Delete them and then download them from the desired Apple ID. This may require repurchasing paid applications.
    (95675)

  • When I try to text my mom, she never receives my text, it always shows as an imessage and never an sms. How can I fix this so that it can be sms like before?

    When I try to text my mom, she never receives my text, it always shows as an imessage and never an sms. How can I fix this so that it can be sms like before?

    Does your mom have an Apple device?

  • Text doesn't always show up?

    Texts always make my iPhone but not always iPad.  How do I make sure always gets to both?

    You might be seeing the effects of the anti-aliasing that PSE applies to the label text.  If your photos are being displayed at a radically different size and/or resolution than originally, the anti-aliasing will make the type look grey.
    Ken

  • Whenever I send a single person text it shows as coming from my e-mail but when I send a group message it comes from my phone. How do I change it so it always comes from my phone number not e-mail.

    Whenever I send a text to a person it shows as coming from from e-mail but when I send a group text it shows as coming from my phone? How can I change it so that all texts come from phone?

    The fact that the problem only occurs when iphones are texting you leads me to think that iMessage may be the culprit. The fact that it is only iphones using SPRINT however is weird. Try turning imessage off on both yours and your sons phones to see if the problem persists. If it does, it may be a carrier problem.

  • App update descriptions no longer showing in iTunes 12.0.1

    Greetings,
    Since updating to Yosemite and iTunes 12.0.1.26, the app update descriptions do not show.
    Any app screen would look like this:
    Main file info is readable, but no text about the update.
    Others having the same issue?

    Same here - since updating to Yosemite (with iTunes 12.0.1.26).  I'm surprised it hasn't gotten patched yet.  I guess they're bundling several fixes before pushing out the first update to Yosemite.

  • Remote Exchange Management Console "W3SVC isn't running on any Exhange servers in site" and always shows older version after SP2 or SP3 installed

    I'm trying to use EMC on a computer to remotely manage Exchange 2010 without having to do from the actual Exchange servers.
    First off, upgrading, uninstalling or installing EMC always fails on "Stopping" services. Seams to be a pretty common problem, but no clear fix other than deleting the registry entry (HKLM\SOFTWARE\Microsoft\ExchangeServer) and the
    "C:\Program Files\Microsoft\Exchange Server" folder. I'm guessing this is a bug since there should not be any Exchange services that need to be stopped on a computer where I'm just trying to use the EMC tool to manage Exchange.
    Next, is where when I open EMC I get "The World Wide Web Publishing Service (W3SVC) isn't running on any Exchange servers in the site. If you want to connect to Remote PowerShell, this service must be running. Make sure that the W3SVC is running on
    at least one Exchange server." From all the reading I am pretty sure that this is due to the Exchange servers being on one version and EMC I'm trying to use is another version.
    This is the version our Exchange Servers are on:
    ProductVersion   FileVersion      FileName
    14.02.0375.000   14.02.0375.000   C:\Program Files\Microsoft\Exchange Server\V14\bin\ExSetup.exe
    Which finally brings me to the part where no matter what SP I install to run EMC it always shows:
    ProductVersion   FileVersion      FileName
    14.01.0218.015   14.01.0218.015   C:\Program Files\Microsoft\Exchange Server\V14\bin\ExSetup.exe
    I've tried SP2, and even SP3 hopeing that an even newer version would let me connect to Exchange, but no matter what it always shows the 14.01 version above.
    I've also tried installing "Exchange2010-KB2874216-x64-en" which should be the same version we are on (Update Rollup 7 for Exchange Server 2010 Service Pack 2), but get a Windows Installer Error stating, "The upgrade patch cannot be installed
    by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program." This Error probably makes sense if no matter what I do I'm stuck with a version prior to SP2. 
    Any ideas?

    Hi,
    From your description, I would like to clarify the following things:
    1. Make sure the World Wide Web Publishing Service is running in Exchange server.
    2. Ensure that the account you use to open EMC is a member of Organization Management role group.
    3. Based on my knowledge, the error "The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program." occurs if you install
    the RU for a different SP. Please re-download the Service Pack 2 and install it on the remote computer since it hasn't been installed successfully from the above information.
    What's more, here is a similar thread for your reference.
    Unable to install Update Rollup 4 for Exchange Server 2010 Service Pack 2
    https://social.technet.microsoft.com/Forums/exchange/en-US/677c21ed-e125-41c1-a468-c268e1f21f8e/unable-to-install-update-rollup-4-for-exchange-server-2010-service-pack-2?forum=exchange2010
    Hope this can be helpful to you.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • Calls from my iPhone 5 always show up as "Private" or "Blocked".

    Calls from my iPhone 5 always show up as Private or Blocked when I call someone else.  (My ID is normal when I text them though.)  I've looked but can't find anything in the phone Settings that would fix this.  Am I missing it or is there a bigger problem?

    Settings > Phone >Show My Caller ID to On.

  • Volume OSD always showing "0"

    Hi,
    I've got a problem with the green volume bar that appears when you use the volume keys. The OSD always shows the volume level as zero ("0" text on the right, empty bar). Controlling the volume works just fine though, it's just the volume level OSD that's broken. Mute icon in OSD also works. 
    I already reinstalled the hotkey drivers several times, including older versions. Also tried deleting the registry entries (HKCU\Software\IBM, HKCU\Software\Lenovo, HKLM\Software\IBM, HKLM\Software\Lenovo), no luck there. 
    Same thing also happens when logging in with a clean user profile. 
    Any ideas? 
    Message Edited by kalsm on 04-12-2009 06:07 AM

    and when i put it on charge the number of battery always decrease and stop on 0% !!!! Please help me

  • Hotspot text compiles showing code, not a working link

    Help would be very appreciated; sorry for not being able to find this in the Adobe site or Grainge..
    Everytime I open my webhelp project, the hotspot text shows code instead of remaining as a hotspot; this is true if the hotspot is in a table or outside table.  I have to keep rebuilding my hotspot text almost everwhere >>> not everywhere <<<<< in my word doc.
    Everytime I open the file, the word doc does not keep the hotspot as a hotspot, shows the code, or the compiled version shows a green instead of blue color, and on top of all this, everytime I open the hpj file I cannot get the toolbar to display properly; all the Robohelp stuff that should be in the toolbar ISNT and I have to keep going into view /toolbars/ customize /options /always show full menus and toggle the dang little checkbox on and off even THOUGH it's already checked.
    What gives and note: I am an original user of RH from the way back machine.
    Also note: I would REALLY like to avoid having to do a reinstall so if ANYONE can comment on this please do asap.
    Also, has anyone else noticed we cannot read the apology text anymore re: the Adobe support apology?
    TC

    Knowing what edition and version of RH you are using would help, see Before You Post.
    Also a screenshot would be helpful. Use the camera icon please to post it.
    Someone else reported a problem with the apology letter some weeks back and I tested it then, The link worked. I have just tested it again and it is working fine. Not sure why you are having a problem.
    See www.grainge.org for RoboHelp and Authoring tips
    Follow me @petergrainge

  • Meta text not showing on mouse over

    Certain sites (such as [http://xkcd.com/789/]) use meta text to add more information, etc. when you run the mouse over the picture. This feature isn't working for me.

    Do those image have a title attribute?
    Firefox only displays a tooltip with the ''title'' attribute and not with the ''alt'' attribute that is meant to show descriptive text in case the image can't be displayed.
    Popup ALT Attribute: https://addons.mozilla.org/firefox/addon/1933
    Tooltip Plus: https://addons.mozilla.org/firefox/addon/11481

  • Always show beginning of JTextField, while it stays selected

    Hello,
    I have an editable JComboBox, and when I select items from it, I highlight the selected item. If the item's length is longer than the textField's width, I have the cursor pointing to the end of the text by default. I was wondering if there's a way to always show the beginning of the text, regardless of the text length, while it stays selected. I have tried setCaretPosition(0) which works, but then unhighlights the text.
    Your help will be very much appreciated.
    Here's my SSCCE:
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    public class MyTextFieldTest {
         JComboBox myComboBox = new JComboBox();
         public MyTextFieldTest()
              JFrame frame = new JFrame("MyTextFieldTest");
              JPanel panel = new JPanel();
              myComboBox = getMyComboBox();
              panel.add(myComboBox);
              frame.getContentPane().add(panel);
              frame.setSize(new Dimension(200,100));
              frame.setVisible(true);
         public JComboBox getMyComboBox()
              myComboBox = new JComboBox();
              myComboBox.setEditable(true);
              myComboBox.setPreferredSize(new Dimension(100,20));
              myComboBox.setSelectedItem("Items...");
              for(int i=0;i<10;i++)
                   myComboBox.addItem("Item "+i);
              myComboBox.addItem("My very long Item");
              final JTextField editor = (JTextField)myComboBox.getEditor().getEditorComponent();
              myComboBox.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        editor.setSelectedTextColor(Color.white);
                        editor.setSelectionColor(Color.blue);
                        editor.selectAll();
              return myComboBox;
         public static void main(String[] args)
              MyTextFieldTest test = new MyTextFieldTest();
    }Edited by: programmer_girl on Sep 18, 2007 5:38 PM

          public void actionPerformed(ActionEvent e)
            editor.setSelectedTextColor(Color.white);
            editor.setSelectionColor(Color.blue);
            //editor.selectAll();
            editor.setCaretPosition(editor.getDocument().getLength());
            editor.moveCaretPosition(0);
          }

Maybe you are looking for