Centre align a text in a smartform

Hello all,
I want to centre align a text in a smartform. It is not using any paragraph format.
I want to use formatting options like (C) for condense.
thanks,
Anju

Hi Anju,
In this case you have to create a paragraph format as CENTER center-aligned and use this paragraph format for the center alignment of the text.
Nagaraj->
Alignment can not be controlled using CHARACTER format.
Regards
DKS

Similar Messages

  • JTable How to align the Text in a Cell to Centre

    Hi Plese Help regarding JTable.
    I want to align the Text in the Table Cell to Centre how to align it. Im using Abstract Data Model TAble an what is the meaning of renderer and its use.. Help me out

    Here are a couple of links you should read for information on tables and renderers:
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#editrender
    http://www-106.ibm.com/developerworks/java/library/j-jtable/index.html?dwzone=java
    Here is an example of a simple renderer that will:
    a) center the text
    b) highlight the background when the cell gets focus
    This renderer is only used in two of the columns of the table.
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableRenderer extends JFrame
         public TableRenderer()
              String[] columnNames = {"Date", "String", "Integer1", "Integer2", "Boolean"};
              Object[][] data =
                   {new Date(), "A", new Integer(1), new Integer(5), new Boolean(true)},
                   {new Date(), "B", new Integer(2), new Integer(6), new Boolean(false)},
                   {new Date(), "C", new Integer(3), new Integer(7), new Boolean(true)},
                   {new Date(), "D", new Integer(4), new Integer(8), new Boolean(false)}
              DefaultTableModel model = new DefaultTableModel(data, columnNames);
              JTable table = new JTable( model )
                   //  Returning the Class of each column will allow different
                   //  renderers to be used based on Class
                   public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
              //  Create cell renderer
              TableCellRenderer centerRenderer = new CenterRenderer();
              //  Use renderer on a specific column
              TableColumn column = table.getColumnModel().getColumn(3);
              column.setCellRenderer( centerRenderer );
              //  Use renderer on a specific Class
              table.setDefaultRenderer(String.class, centerRenderer);
         public static void main(String[] args)
              TableRenderer frame = new TableRenderer();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
         **  Center the text and highlight the focused cell
         class CenterRenderer extends DefaultTableCellRenderer
              public CenterRenderer()
                   setHorizontalAlignment( CENTER );
              public Component getTableCellRendererComponent(
                   JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
                   super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
                   if (hasFocus)
                        setBackground( Color.cyan );
                   else if (isSelected)
                        setBackground( table.getSelectionBackground() );
                   else
                        setBackground( table.getBackground() );
                   return this;

  • Aligning a text layer to the centre of the image?

    Hi,
    I've just been creating a watermark for my photos in Photoshop CS5. I've found the 'Align' tool under 'Layer' in CS5 but align is greyed out. How can I align the text layer to the centre of the image if I can't use the align tool?
    Thank you!
    Chris.

    You need to select the layer (ctrl/a) then you can align it.

  • Aligning the Text in Centre for MultiLine Cells in JTable

    Hi;
    Does anyone know how I could make a java table that has multiline text cells AND this multiline text is aligned to center? I tried to extend JTextArea and to implement TableRenderer - multiline was OK but it did not do anything on setHorizontalAlign. If I extend DefaultTableRender than I can align the text to center but I got no multiline...
    Any ideas?
    Kindly to provide me a solution for this its urgent.

    Hi;
    Thanks for the reply,on using Text Area as renderer i.e using Multi-Line cells in JTable, i achieved the objective of displaying the text on multiple lines in the cell."In my Table there are 5 columns and i'm setting renderer on 3rd and 5th column,If the text is too large in column 5 it automatically gets wrapped off for all the cells in column 5.For column 3 my text is not so large as compared to column 5 and due to which the Text in the column 3 starts from the top for all the cells i.e (the first row in column 3 is parallel to first row in column 5 ),Now the problem is i can't display the text in the center of all cells for Column 3 .
    Thanks in advance

  • How to change the font size of text element in smartform

    Hi
    i want to know how to change the font size of text element in smartform
    regards
    Gincy

    Hi
    You can create Smartstyles, in which you can define paragraph formats for texts and character formats for character level changes.
    Paragraph format ---> alignment, font size etc
    character format for ---> superscript, subscript.
    After creating, in your smartform, there will be a option in the text element to enter a style.
    You give the created style and you can use the paragraph and character formats i that style.
    Hope this is clear..
    Regards
    Sekar

  • Verticle alignment of text

    Hi All,
    Is there any way to align the text vertically. At present the data seems to be aligned at the top, i need to align it in centre.
    I Tried Layout->Alignment->Align Centre (Vertically) but it has no effects.
    I also tried SRW.SET_JUSTIFICATION(SRW.JUST_HCENTRE) but it is for horizontal alignment.
    Please Help.
    Regards,
    Ashish Goel

    Hi,
    better u can use center justify. The text has come in to the report automatically center.
    See in the Report Layout model after B, I, U after that four options agiven start justify , center justify , right justify , flush justify
    . which justify u want u can select it .

  • Centre align column when using rowClasses

    Hi,
    Whats the best wayt o centre align some columns in a dataTable when using rowClasses? The normal approach would be to set the style on the columnClass but obviously that won't work in this situation.
    Any ideas?
    Thanks

    You could try to use CSS to specify the 3rd column, e.g.
    TD + TD + TD { text-align=center; }
    (don't know if this works...}

  • How to change TEXT EDITOR in SMARTFORMS

    Dear All,
    How to change TEXT EDITOR in SMARTFORMS i am getting editor like Microsoft Word but i want the regular editor.
    I am using ECC 6.0 GUI 710
    thanks,
    RP

    Solution By Mr. Eitan Rosenberg is correct.
    Program Name: RSCPSETEDITOR
    Thanks a lot.
    Regards..........

  • How can I align a text object by the visible text and NOT by its bounding box?

    Illustrator CS4.
    I am trying to align some text to the center of the artboard. The bounding box is bigger than the text, so when I try to align it to the artboard it doesn't actually center align the artwork as I need it to. The text is needing to be aligned with another text object, so I can't just center align the text and then align to the artboard (which would eliminate the bounding box problem, I think). To make matters worse, the text I want to align has a stroke.
    The only way I know to currently align the text properly is to convert it to outlines. This is what I've done, but I need something better. I want to be able to have my illustrator file that has all editable text and then be able to make a separate identical file with all text converted to outlined paths. The only thing holding me back right now is that I can't get the exact alignment while everything is still as text.

    The solution is to simple to believe and probably why you over looked it.
    You make two text frames to exactly the height and width of the text. You position the text in the relative location and then group the text frames  then center that group on the artboard.
    Like such:
    If you ever want to add text that should be no problem but you have to re center.

  • Using read text fm in smartforms

    hi experts,
                  I have captured a text using Read_text Fm .now i need to use it inside a smartforms .how to do .
    i have used that code inside a program line .
    and in text i have called the field.
    declaration in form interface
    text type char20
    itab type tline
    in program lines
    data itab like TLINE occurs 0 with header line.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
    * CLIENT                        = SY-MANDT
        id                            = '0001'
        language                      = 'E'
        name                          = '0080000055'
        object                        = 'VBBK'
      ARCHIVE_HANDLE                = 0
      LOCAL_CAT                     = ' '
    IMPORTING
      HEADER                        =
      tables
        lines                         = itab.
    LOOP AT ITAB.
    text = ITAB-TDLINE.
    ENDLOOP.
    in text
    &text&
    but the text value is not printing .but i am getting the value when i do it in SE38.
    what shall i do?
    regards,
    mani

    Hi ,
        Instead of using the FM, Use the standard functionality to print the required text provided by Smartforms.
      Create a text element, in the left top...in the drop down there is an option of include text...
    id = '0001'
    language = 'E'
    name = '0080000055'
    object = 'VBBK'
    u will get the dessired output
    Regards,
    Himanshu

  • Pls explain how to add standard text in sapscript & smartforms

    Dear friends,
    pls explain how to implement standard text into sap script and smartforms.
    in how many we can do.
    and what is diff between include text & text modules in smartforms.
    how we can translate into multiple languages.
    Regards
    Jagadeeshwar.B

    hi,
    for the include text goto tcode so10.
    for changing the smartform and scripts use there methods..
    1. goto se63>translation->abap objects->other long texts->FS Forms and Styles---> for scripts use Forms
                                           for smartforsm use SAPSmart form
                                           for styles use Styles
    2. goto se71->utilities->original language.---> source lang
    (for scripts)                                                     target lang
    to include the include text created in the tcode so10 in the smartforms go to general attributes of the text element--text type> include text...
    regards,
    venkat.
    Edited by: venkat  appikonda on Mar 22, 2008 11:56 AM

  • Printing chinese text in a smartform.

    Whenever, I try to write chinese text in the smrtform, some weird characters appear. How can I paste chinese text in the smartform. Please provide me a solution.
    Moderator message: please do some research before asking.
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    Edited by: Thomas Zloch on Feb 28, 2011 9:21 AM

    Please check with your basis that your output device support print Chinese character. Or, you can search more in forum, there are a lot of threads about print Chinese and other Unicode characters in form.
    Thanks,

  • Standard text from SO10 - smartform

    Hi Folks,
    I need to print a document with some standard text and the vendor address.
    1.For this I had created the standard text in S010,how to call this standard text in the text editor of the main window?
    This standard text will be the same for all the vendors.
    2.I need to fetch the address of the vendor.So I had created a select option.I have to print this document with the standard text for each vendor.Text will remain the same but the vendor address differs.I had created a structure having all the fields for the address and declared in the form interface.Internal table is getting populated but it is not printing in the smartform.
    How to get the document in one shot for all the vendors given in the range.
    Thanks,
    K.Kiran.

    u can call the standrd text from the smartform directly :
    got the smarform u created/ developed.
    create text.
    in the general attributes tab give the type <Include Text>
    assign the standard text that u want ot inclue.
    smartform will call that directly
    address cn be created direclty from the smartform
    in creation u will the get the option to create the address.
    just give th varible and populate the varible from the program.
    Thanks

  • Alignment of text in textField

    hi
    how to change the alignment of text when typing in textField ?

    I don't think JavaFX support right to left oriented languages like Arabic (I think support is scheduled for JavaFX 3.0).

  • Text element in smartforms

    Hi guys,
    What is the use of text elements in smartforms? I am getting confused. For texts, we generally use text modules rite? So what is the difference between the two. Wehn am i to use text element and when am i to choose text module. Please explain me in detail
    Regards,
    Prem

    Hi,
    Text Elements (locally in form)
    To include data from the form interface (data from application tables) or system data (date, time) into the text, use system fields or user-defined fields in the text When processing the form, SAP Smart Forms replaces these fields with the corresponding values
    Text Modules (for reusing texts)
    You can use text modules to store texts that frequently appear in your forms which is stored centrally in the system. This detaches text maintenance from form maintenance, with the result that you do not need to call the Form Builder to edit individual texts.

Maybe you are looking for

  • Freqeuent CS4 Crashes-Troubleshooting help needed

    Constant crashes in Illustrator CS4 on a Mac are driving me crazy. I've done endless searches, tried many remedies and all have come up empty. Is there any way to use the crash logs or something to narrow this down (better yet, solve it)? Details: Il

  • Where can I find a replacement for the power adapter tip?

    I need to replace the small adapter that allows the power adapter to be inserted into a socket. Does apple sell this part separately? The adapter itself works fine. But the tip that gets inserted into the adapter, and then the wall, has started to ma

  • DSCL issues: /Groups/admin problem

    Hello, As I recently reinstalled OS X, there was a temporary user and, even though it's been deleted, it left some traces behind. I looked online how to erase all traces of deleted users and found a nice tutorial which made me delete /Groups/admin be

  • Face time not available.

    I brought a new ipad2 from online app store in dubai. To my surprise facetime was missing. I searched the net and came to know facetime is blocked in uae. Good, i respect the laws. I brought this as a gift for my parents in india so taht they can use

  • How to resolve this Search Problem????

    Hi Every one I have a search module..I've never worked on... the problem is when i run that search module and after selecting date from date picker and clicking the search button i got following error: Error JBO-27122: SQL error during statement prep