How to wrap the text in column headers?

Hi Friends,
Can anyone please suggest how to wrap the text in column headers of a Java WebDynpro table?
I believe that caption is the only UI element that a column header can have and it does not allow wrapping of the text.
My original requirement is as follows,
In a table I need to dynamically set the width of the columns according to the width configured by the user in some other view. All the columns of the table are dynamically rendered.
Now what happens is when the user sets the width of the column to a rather low value, say 15 pixels, then the column is displayed like
Supplier Catalog Name
Sheila
Catalog
Name
Dropdown
As you can see it looks rather odd.
Supplier Catalog Name is the header of the column and I use IWDCaption for header.
Sheila Catalog Name Dropdown is the value of a particular row at the specified column. I am using a TextView as the TableCellEditor.
I think what is happening here is that the framework wraps the text in the TextView according to the width specified (15px) and then the column width is extended because it can not accommodate the text (Supplier Catalog Name ) of the column header.
We are using SAP NetWeaver Development Studio 7.0.12 as the IDE.
I searched some forums and many people have suggested using scrollable columns but I don't understand how it will help in wrapping the text in a column header.
Any help would be of great advantage.
Thanks
Amit

Hi Deepti,
Thanks a lot for the answer but the option that you have specified does not wrap the text. Instead it truncates the text being displayed and only the substring of the text which could be displayed in the given pixels is displayed.
I need to show the whole text wrapped (Meaning if the width of the column is not sufficient then the text goes into the next line).
Ayyapparaj,
Thanks to you too for an helpful answer. It seems that the Netweaver has finally come up with a way to wrap the text in the column headers but as Manoj pointed out, I do not see the property headerTextWrapping  for a table column, Can you please specify which version of netweaver supports it?
We are using SAP NetWeaver Development Studio 7.0.12 as the IDE.
Thanks
Amit Kapoor

Similar Messages

  • How to wrap the text in JTextPane

    hi all,
    I have a problem with JTextPane. I have a JPanel which have 4 JButtons, one Details button and one JTextPane. I have set JTextPane to JScrollPane. Thing is when i press the Details button the JTextPane must be visible. Window size is changing. can any one say how to wrap the text in the JTextPane.

    By default text in a JTextPane will wrap, so I don't understand the question.
    Read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/text.html]Using Text Components for a working example.

  • How to wrap the text in a label component

    I'm displaying a text in the label component and the output is displayed on the plasma display(It is a java application running on a pc and output is given to plasma display). But the text size is more and getting cut at the edge on the display. How can I wrap the text automatically.

    See
    [http://forums.sun.com/thread.jspa?messageID=10391430]

  • ADF 11g + How to wrap the text in a goimagelink

    Hi All,
    I'm displaying some list of goimagelinks, for which the information is being retrieved from the database. Now to align the width in between the imagelinks properly, I need to wrap the text of the go image link. Any suggestions, will help me a lot.
    Thanks All in Advance. Below is the code snippet for the same.
    Thanks & Regards,
    Dharmathej M
    <af:panelFormLayout id="pfl6" rows="3" maxColumns="3"
    labelWidth="30"
    inlineStyle="text-align:justify;">
    <af:iterator id="i6"
    value="#{bindings.LP_Applications1.collectionModel}"
    var="appiter"
    rows="#{bindings.LP_Applications1.rangeSize}">
    <af:goImageLink text="#{appiter.bindings.AppName.inputValue}"
    id="gil2"
    icon="#{appiter.bindings.Icon.inputValue}"
    iconPosition="leading"
    inlineStyle="font-size:small; font-family:Verdana, Arial, Helvetica, sans-serif;"
    destination="#{appiter.bindings.Url.inputValue}"
    shortDesc="#{appiter.bindings.ShortDesc.inputValue}"
    targetFrame="#{appiter.bindings.ExtLink.inputValue == 'T' ? '_blank' : '_self' }"/>
    <af:spacer width="70" height="10"/>
    </af:iterator>
    </af:panelFormLayout>
    ################################################################

    Try the CSS <tt>display</tt> property in combination with some fixed width, for example:
    <af:goImageLink ... inlineStyle="display:inline-block; width:80px;">

  • How to wrap the text in a popup LOV item ( Apex 4.0 )

    Hi
    I have a popup LOV type item with a very long string value
    I would like to format the item so itr will be shorter but have the string wrap to multiple lines.
    Can you let me know how that can be achieved ?
    thanks
    O

    Hmm.. I don't know about that.
    I actually already managed to change the width of a specific popup element by putting the following in the region footer :
    <script type="text/javascript">
    $x('P3_CONTRACT').style.height="20px";
    </script>
    that works fine and only impacts that specific element.
    However , Since I know next to nothing of HTML and Javascript , I could not figure out the code to put to make the text wrap.
    your solution suggests that it will take care of the width , but will it cause the words to wrap ?
    thanks
    O
    Edited by: Orna Weisman on Apr 30, 2012 7:08 AM
    Edited by: Orna Weisman on Apr 30, 2012 7:15 AM

  • How to wrap the text in a jTextArea

    Hello all,
    I am currently developing a simple simulation program for our scientific research group. My boss asked me to employ the program with a GUI. However, I am new to Java Swing. It is nice to have you guys that may provide a helping hand to my problem.
    My problem is with the jTextArea. Because my result to be displayed in jTextArea is lengthy and its length varies. The way I extract the result is to use a String to hold all of the results and directly pass it to the jTextArea. However, It is lope-sided and not quite user-friendly. Is there any function that I can use so that the text can be wrapped and that the user doesn't need to scroll left or right to view the results?
    Thanks in advance(:
    Message was edited by:
    Shahn
    Message was edited by:
    Shahn

    am currently developing a simple simulation program for our scientific
    research group. My boss asked me to employ the program with a GUI.
    However, I am new to Java Swing. It is nice to have you guys that may provide
    a helping hand to my problem.something is amiss.
    you're a developer (new to swing is irrelevant) and you don't know how to read the api docs?
    there are only 6 set...() methods (apart from inherited) and what you want is 2 of them.

  • Wrapping the text on the confirmation dialog

    Can any one pls tell me how to wrap the text on a confirmation dialog?
    thanks in advance.
    regards
    Lakshminarayanan.V

    Hi,
    Currently this is simply not possible. Probably later TextView UI element will be enhanced to support this (at least, this feature is at "Whish List", search this forum for word POLL), and confirmation dialogs will inherit desired behavior automatically.
    For now you have to create your own component and use it pop-over window as confirmation dialog. In your component you may either use TextArea for multi-line display (quick and ugly) or split string into several context attributes and display them using several TextView UI elements (either dynamically created or pre-created till some reasonable maximum, say, 5 lines <-> 5 controls)
    VS

  • How to change the "name of column" property of an text item in runtime?

    How to change the "name of column" property of an text item in runtime?
    I look the properties of items in help and found nothing about this!
    It's possible?

    Hi,
    an other solution is change the block property QUERY_DATA_SOURCE_TYPE from "Table" to "Sub-query" , than change at run time the property QUERY_DATA_SOURCE_NAME.
    First create block and add items
    The QUERY_DATA_SOURCE_NAME will be for ex. "Select 'A' as col1, 'B' AS col2, 'C' as col3 from dual"
    Set into items the column name property to col1 , col2 ...
    At run time change the query to "Select 'Z' as col1, 'X' as col2 , 'Y' as col3 from dual"
    in this way you can change the source of column value.
    Caution because if you change value type from varchar2 to date you must cast date into varchar2.
    May be that this way is valid only for view data not for insert-update, i don't remember.
    bye
    Message was edited by:
    Killernero

  • How to wrap the heading text in alv.

    HI all,
          I need help, how to wrap the heading text in alv.
    can any help ... plz..
    Advanced Thanks
    Regards
    GUhapriyan

    Hello GuhaPriyan,
    I assume that you're referring to the ALV Grid's title. The maximum length for this title is 70 characters and this would generally fit in the one line.
    Are you intending to wrap it because you purposefully want the text to come in two lines? In that case, I'm not sure that it's possible.
    But otherwise, there's an option in the Layout called SMALLTITLE. You can set this attribute so that the title would be displayed in a amaller font and hopefully, all of your text shows up on the screen.
    Regards,
    Anand Mandalika.

  • How can I wrap the text for LinkToAction UI Element.

    Hi All,
    I am trying to wrap the text for LinkToAction UI Element which is inside the group.I have set the wrap property to be true.But still its not getting wrapped.I have set the width of the group to be 0px.I have even set the wrap property for the RootUIElementContainer and set the width property to be 0 px.I am using the FlowLayout.Any ideas are appreciated.
    Thanks in Advance

    I have the same problem.
    would you plz tell me how to wrap.

  • How to aling the text in a JTable???

    I use this code to make a vertical header like in excel. The thing is that i want to aling the text in that column but i couldn´t. I try to set the render, but i loose the header render in the column. Anyone know how to aling the text in that column with out loosing the header effect????
    i post a code that i use as model for my project.
    package com.chuidiang.ejemplos;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.WindowConstants;
    import javax.swing.table.DefaultTableModel;
    * Ejemplo de cómo hacer una "cabecera" lateral en un JTable. Idea original de
    * Leunamal en
    * http://foro.chuidiang.com/java-j2se/tabla-de-referencias-cruzadas-en-java/
    * Básicamente consiste en hacer que la primera columna: - No sea editable. - No
    * sea seleccionable. - Tenga el mismo render que el JTableHeader superior.
    * @author chuidiang
    public class CabeceraLateral {
          * Crea y visualiza una ventana con un JTable que tiene cabecera en la parte
          * superior y en la columna izquierda
          * @param args
         public static void main(String[] args) {
              // Un modelo de datos que hace la primera columna (la de
              // la cabecera lateral) no editable.
              DefaultTableModel tm = new DefaultTableModel(10, 5) {
                   @Override
                   public boolean isCellEditable(int row, int column) {
                        if (0 == column)
                             return false;
                        return super.isCellEditable(row, column);
              // Titulos para la cabecera superior. El primero es vacio,
              // puesto que corresponde
              tm.setColumnIdentifiers(new String[] { "", "A", "B", "C", "D" });
              // Valores para la primera columna, que es la cabecera lateral.
              for (int i = 0; i < 10; i++)
                   tm.setValueAt(i + 1, i, 0);
              // JTable al que se le pasa el modelo recien creado y se
              // sobreescribe el metodo changeSelection para que no permita
              // seleccionar la primera columna.
              JTable t = new JTable(tm) {
                   @Override
                   public void changeSelection(int rowIndex, int columnIndex,
                             boolean toggle, boolean extend) {
                        if (columnIndex == 0)
                             super.changeSelection(rowIndex, columnIndex + 1, toggle,
                                       extend);
                        else
                             super.changeSelection(rowIndex, columnIndex, toggle,
                                                 extend);
              // Se pone a la primera columna el render del JTableHeader
              // superior.
              t.getColumnModel().getColumn(0).setCellRenderer(t.getTableHeader().getDefaultRenderer()); //here i set the render for the column. But when i try to aling the text, this column loose the effect.
              // Creación y visualización de la ventana completa.
              JFrame v = new JFrame("Cabecera lateral");
              JScrollPane sp = new JScrollPane(t);
              v.getContentPane().add(sp);
              v.pack();
              v.setVisible(true);
              v.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }

    The word is "align" not aling.
    To right-align the first column, you can do this in a prepareRenderer override.    JTable t = new JTable(tm) {
          @Override
          public void changeSelection(int rowIndex, int columnIndex,
                  boolean toggle, boolean extend) {
            if (columnIndex == 0) {
              super.changeSelection(rowIndex, columnIndex + 1, toggle,
                      extend);
            } else {
              super.changeSelection(rowIndex, columnIndex, toggle,
                      extend);
          @Override
          public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
            Component c = super.prepareRenderer(renderer, row, column);
            if (column == 0) {
              ((JLabel) c).setHorizontalAlignment(JLabel.RIGHT);
            return c;
        };You can find other alternatives to your approach by searching the net for "[JTable row header|http://www.google.com/search?q=JTable+row+header]"
    db

  • How to print the text in points wise in sap script

    hi friends,
    how to print the text in points wise in sap script.
    ex: if suppose paragraph consists of 15 lines. then according to one sentence or one fullstop (.) it should give point 1. like that...
    1. hai how ru.
    2. what r  u doing.
    3.where r u.
    like this i want numbering.. waiting for ur replys.
    thanks,
    kiran

    declare a counter
    data : cnt type char 4.
    print :
    cnt = cnt + 1.
    &cnt& &text&
    cnt = cnt + 1. and so on.
    or.
    if the data is in an internal table
    loop at internal_table.
    cnt = cnt + 1.
    write form.
    in script -&cnt& &text&
    endloop.
    Edited by: NIKHILKUMAR POOJARI on Nov 17, 2008 11:18 AM

  • How to print the text in only last but one page in sapscripts

    hiiiiiiiiiii,
             explian how to print the text in only last but one page in sapscripts? wher to write the code? plz if possible explain in detail with an example?

    Hello,
    The total no pages is given by &SAPSCRIPT-FORMPAGES& command.
    So u can handle the situation in ur form like this
    /: if &PAGE&  = &SAPSCRIPT-FORMPAGES&
    p1 TEXT
    /: endif
    Try in this way it may help u.
    Regards

  • Did you know how to link the text in two or more text boxes?

    Did anyone know how to link the text in two or more text boxes in Pages 5.0? Thanks for your answer.
    Qualcuno sa come collegare il testo in due o più caselle di testo nella versione 5.0 di Pages. Grazie per le vostre risposte.

    It's just one of the many, many features that have been eliminated or changed. Leave feedback for the Pages team using the link in the Pages menu and review & rate the new versions in the Mac App Store.
    If you previously had iWork '09, those apps are still in your Applications folder in a folder named iWork '09. You can continue to use them to get things done.

  • How to find the number of columns in an internal table DYNAMICALLY ?

    Hi,
    How to find the number of columns in an internal table DYNAMICALLY ?
    Thanks and Regards,
    saleem.

    Hi,
    you can find the number of columns and their order using
    the <b>'REUSE_ALV_FIELDCATALOG_MERGE'</b>
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
       I_PROGRAM_NAME               = sy-repid
       I_INTERNAL_TABNAME           = 'ITAB'
       I_INCLNAME                   = sy-repid
      changing
        ct_fieldcat                  = IT_FIELDCAT
    EXCEPTIONS
       INCONSISTENT_INTERFACE       = 1
       PROGRAM_ERROR                = 2
       OTHERS                       = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif
    now describe your fieldcat . and find no of columns.
    and their order also..
    regards
    vijay

Maybe you are looking for

  • How to set iPhone Bluetooth to be just for phone calls?

    Is there a way to setup an iPhone 4s/5, iOS 6, to use the bluetooth only for phone calls? I don't want music, youtube, google maps, or any app to go thru my car speakers. Phone calls work fine because the car will switch to Bluetooth audio automatica

  • Input and ouput out of sync by 16 samples

    I am generating a continuous ouput at 1khz at the maximum sample rate of my DAQ NI6363.  I want to read one period at the input but if i capture 2k sample at 2Mhz contunuously I dont get a ful perod and my input measurement results in a "running wave

  • How to burn an "event's" photo contents to a dvd

    Have an event with lots of photos. I'd like to burn the photo contents of that event to a dvd. Best way? Thx, Steve

  • Native Schema builder - enhancement request

    Hi, DB and AQ adapters have the nice capability to auto-create XSDs from Oracle ADTs. It will be nice if that can be added to Native Schema Builder wizard as another create schema option. When you are using the adapter most likely your development sk

  • JSF Component Tree questions

    In JSF, the components in the jsp page are converted in to a tree accessible by the Controller, is that correct? Can I manipulate that tree on the fly and will the tree be rendered properly when displayed? Even more important, will the tree be recrea