Cell figures alignment

Hi,
for those of you who don't know me, I'm new at ID.
I'm tackling tables. And I have a problem. How do you align figures in columns where you have normal figures like 25,000 and below it you have minus figures like (25,000). What I want to do is align them, so the parenthesis hangs out (a bit to the right), and the 25,000s perfectly align. I'm doing tables in the cell style, properly.
Thanks.

P Spier wrote:
Align on the decimal point.
The tab is implied inside the cell unless you add another manually.
I'm sorry, I don't understand this sentence. Do you mean ID thinks there's a tab in the cell? Because I still can't do it with a decimal point, nothing happens.
OR
Do I need to put a tab into every cell? With Insert special character?

Similar Messages

  • Can table cell vertical alignment be defined via CSS?

    In a table cell (ie, "td") is there a way to define "valign" via CSS, instead of the table cell proper?
    In other words, instead of...
    <table>
    <tr>
    <td valign="top">
    ...is it possible to do :
    <table>
    <tr>
    <td class="top">
    ...and somehow let the stylesheet define the vertical alignment?
    I'm asking because none of the attribute presets in Dreamweaver CS4 seem to provide for vertical alignment. Everything else on God's green earth seems to be there, but table cell vertical alignment seems to be the ONLY thing CSS forgot about.

    How about giving the class "top": text-align:center. Or even the tag "td" in your stylesheet. Does that help?
    John

  • Cell horizontal alignment

    Hi,
    does someone know how to set the horizontal alignment of a cell ???
    Thanks, Fred.

    A JTable object provides a TableCellRenderer object for each of its column. It usually takes it from the TableColumn object provided by its own TableColumnModel, if available, or otherwise provides a DefaultTableCellRenderer object. This default cell renderer is basically a JLabel formatted according to the type of value it has to display.
    You can write your own cell renderer, e.g. a JLabel that you format as you wish, and set it as the default cell renderer for the table using the setDefaultRenderer method.
    Or you can overwrite the getCellRenderer method of the table and have it return the appropriate cell renderer for a column.
    Or you can write your own TableColumnModel and have it used by the table.
    The chosen solution depends on what you really need to do. Hope it helps.

  • Contact Form positioning, cells mis-aligned?

    I built a contact form and put it up at
    http://www.newood.com/catreq.htm
    For some reason, a couple of the cells that hold form fields
    are not aligned correctly, both in IE and in Firefox. Is there
    someone here that could check the code for me and might have a clue
    to why this is going on?
    Thanks!
    Sarah Woods

    Before worrying about any layout issues, it's a good idea to
    make sure that
    your page contains Valid HTML - yours fails that test in a
    number of very
    important ways. Please take a look here and fix these errors
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.newood.com%2Fcatreq.htm
    Then we'll take a look at your alignment issue....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "kismetdesign" <[email protected]> wrote in
    message
    news:g4qsh3$lna$[email protected]..
    >I built a contact form and put it up at
    http://www.newood.com/catreq.htm
    >
    > For some reason, a couple of the cells that hold form
    fields are not
    > aligned
    > correctly, both in IE and in Firefox. Is there someone
    here that could
    > check
    > the code for me and might have a clue to why this is
    going on?
    >
    > Thanks!
    >
    > Sarah Woods
    >

  • JTable cell data alignment ..Emergency

    Hello,
    I have created a table using a JTable. I want to align some columns data right, and some left and some columns center. How do I go about to do this. If i add textfields on this table ..then all the stuff goes smooth but in case of simple TableColumns alighnment dont work
    for(int index=0;index<columnNames.length;index++)
    TableColumn column = table.getColumnModel().getColumn(index);
    Component component =table.getDefaultRenderer(table.getColumnClass(index)). getTableCellRendererComponent( table, data[index],false, false, 0, index);
    if i cast component to textField then i found Method name textField.setHorizontalAlignment(SwingConstants.RIGHT);
    but if i hav simple JTable then i dont found any method setHorizontalAlignment(SwingConstants.RIGHT);
    Can you please help me.
    Thanks in advance

    Overrider getColumnClass() in your table model such that you return the class of the data in that column. For java.lang.Number derivatives, JTable will right justify those for you.

  • JTable when scroll horiz column cells dont align with header

    Hi,
    I'm having a problem with my JTable. Everything was working correctly until i introduced checkboxes into a column on teh table. I have a table which has a horizontal scrollbar to scroll across all the columns. when i set one column to boolean values (instead of the strings 'true' and 'false' which were there before) when i scroll across the table the headers of each column no longer align with the data.
    Some columns resize when i scroll and the headings always stay the same width.
    I'm getting an error:
    java.lang.ClassCastException
         at javax.swing.JTable$BooleanRenderer.getTableCellRendererComponent(Unknown Source)The database stores int 0/1 for the boolean value so in the getValueAt method of my table model i return a boolean for this column.
    Any help would be greatly appreciated!
    Thanks,
    Saz

    Thanks for replying. Neither solution worked.
    The problem is definately with the boolean value because i'm getting a classcast exception: at javax.swing.JTable$BooleanRenderer.getTableCellRendererComponent(Unknown Source)
    I've a feeling this could be caused by some values being empty strings in the same column with booleans?
    Does anyone know what causes this error?
    Thanks,
    Sarah

  • J Table - Single Cell Alignment

    Hello everyone,
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.util.Random;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumnModel;
    public class RowColorTest
        private JTable table;
        public static void main(String[] args)
            new RowColorTest();
        public RowColorTest()
            javax.swing.SwingUtilities.invokeLater(new Runnable()
                public void run()
                    createGUI();
        public void createGUI()
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
            String[] columnNames = new String[4];
            columnNames[0] = "Name";
            columnNames[1] = "Age";
            columnNames[2] = "Value";
            columnNames[3] = "Extra";
            Object[][] data = new Object[20][4];
            Random r = new Random();
            for(int a=0; a < 4; a++)
                for(int i=0; i < 20; i++)
                    if(i == 0 || i == 5 || i == 10 || i == 15)
                        data[i][a] = 23;
                    else
                        data[i][a] = r.nextInt(50);
            DefaultTableModel model = new DefaultTableModel(data, columnNames);
            table = new JTable(model)
                public boolean isCellEditable(int rowIndex, int vColIndex)
                    return false;
                public Class getColumnClass(int column)
                    return getValueAt(0, column).getClass();
                public Component prepareRenderer(TableCellRenderer renderer, int row, int column)
                    Component c = super.prepareRenderer(renderer, row, column);
                    TableColumnModel tcm = table.getColumnModel();
                    Object result = getValueAt(row, tcm.getColumnIndex("Value"));
                    if(result instanceof Integer)
                        if(((Integer) result) == 23)
                            c.setBackground(new Color(0, 255, 153));
                            c.setForeground(Color.BLACK);
                            if(column == 0)
                                    // I would like to do a CELL ALIGNMENT for this particular condition.
                                    // setHorizontalAlignment() does not exist for the object c (Component).
                        else
                            c.setBackground(Color.WHITE);
                            c.setForeground(Color.BLACK);
                            if(column == 0)
                                    // I would like to do a CELL ALIGNMENT for this particular condition.
                                    // setHorizontalAlignment() does not exist for the object c (Component).
                    if(table.isRowSelected(row))
                        c.setBackground(Color.BLUE);
                        c.setForeground(Color.WHITE);
                    return c;
            JPanel panel = new JPanel();
            JScrollPane sp = new JScrollPane(table);
            panel.add(sp, BorderLayout.CENTER);
            frame.setContentPane(panel);
            frame.pack();
            frame.setVisible(true);
    }Sorry for bringing this up again, but I am having a hard time trying to "align" a single "cell". In the code that I have provided, I tried to find a method from the Component object for setHorizontalAlignment() hoping to make this call:
    c.setHorizontalAlignment(SwingConstants.RIGHT);
    However, it does not exist. How would I go about setting the alignment for an individual cell? I've searched the forum for "cell alignment" and found some information about using a DefaultTableCellRenderer, but I'm not sure how to merge that with the existing code that I currently have.
    In this thread: http://forums.sun.com/thread.jspa?forumID=57&threadID=659910 , camickr pointed out that I can use the row and column variables to find which cell to align, however once I've found the particular cell that I'd like to align, what do I do next? The component c does not have a method to set alignment in this scenario.
    Thanks again,
    Brianiak

    You - the programmer - know that the component in question will be a label of some kind. The compiler, however, does not. As far as javac is concerned, the component could be, say, a 3D animation, in which case setHorizontalAlignement would be illegal.
    In order to share our runtime knowledge with the compiler, we have to use some explicit casting:
    (JLabel)c.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);Note that this will lead to runtime errors if our component is not an instance of JLabel, so it's a good idea to surround the code with:
    if (c instanceof JLabel){
    }

  • Vertical alignment in table cells not working in generated output

    Using RH9 WebHelp. I have created a simple table style. Because I could not find out how to make cell vertical alignment (top, center, bottom)  part of the style definition, I have been applying it manually to individual whole tables using the cell alignment properties.
    This worked fine for a while, but at some point I noticed that even though the tables look right in Design view, with top-aligned cells contents, it gets hosed in generating output and all tables now come with vertically centred cell contents even through the in-line formatting for top alignment is still there in the code.
    Any ideas?

    Hi Mike,
    I'm confused to where you applied the vertical alignment. Normally, I would set this for the table cells and not the table.
    CSS has indeed an order in rendering: There is a point system for determining the CSS to apply. See http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-understanding-css-specific ity/ for a short introduction.
    And as an extra to the point system, the place where the styling is present, also determines the styling. Browsers use the following hierarchy (in descending order)
    User style sheet defined in the browser.
    Inline styling.
    Style block in page.
    External style sheet
    You can overwrite styling from a lower order using the !important declaration. You can use this to make sure that inline styling will not be able to overwrite styles from your style sheet. (Unless the inline styles use !important themselves.) Example:
    table.mytable td {
         vertical-align: middle !important;
    This will make all the content of table cells in the table with the class mytable to be vertically centered.
    Greet,
    Willam

  • Custom Table Cell Renderer Unable To Set Horizontal Alignment

    Hello,
    I have a problem that I'm at my wit's end with, and I was hoping for some help.
    I need to render the cells in my table differently (alignment, colors, etc) depending on the row AND the column, not just the column. I've got this working just fine, except for changing the cell's horizontal alignment won't work.
    I have a CustomCellRenderer that extends DefaultTableCellRenderer and overrides the getTableCellRendererComponent() method, setting the foreground/background colors and horizontal alignment of the cell based on the cell's value.
    I have a CustomTable that extends JTable and overrides the getCellRenderer(int row, int column) method to return a private instance of this CustomCellRenderer.
    This works fine for foreground/background colors, but my calls to setHorizontalAlignment() in the getTableCellRendererComponent() seem to have no effect, every cell is always displayed LEFT aligned! It's almost like the cell's alignment is determined by something else than the table.getCellRenderer(row,column).getTableCellRendererComponent() method.
    I've also tried setting the renderer for every existing TableColumn in the TableModel to this custom renderer, as well as overriding the table's getDefaultColumn() method to return this custom renderer as well for any Class parameter, with no success.
    No matter what I've tried, I can customize the cell however I want, EXCEPT for the horizontal alignment!!!
    Any ideas???
    Here's the core custom classes that I'm using:
    class CustomTable extends JTable {
    private CustomRenderer customRenderer = new CustomRenderer();
    public CustomTable() {
    super();
    public TableCellRenderer getCellRenderer(int row, int column) {
    return customRenderer;
    } // end class CustomTable
    class CustomRenderer extends DefaultTableCellRenderer {
    public CustomRenderer() {
    super();
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    if (row % 2 == 0) {
    setForeground(Color.red);
    setHorizontalAlignment(RIGHT);
    } else {
    setForeground(Color.blue);
    setHorizontalAlignment(LEFT);
    return this;
    } // end class CustomRenderer
    Even worse, I've gotten this to work fine in a trivial example I made to try and re-create the problem. But for some reason, this same thing is just not working for horizontal alignment in my actual project?!?
    Anyone have any ideas how the cell's horizontal alignment set in the getTableCellRendererComponent() method is being ignored or overwritten before the cell is being displayed???
    Thanks, any help is appreciated,
    -Alex Blume

    Ok, so I've looked into their source and I think I know where and what the trouble is. The JTable.java has a method called:
    3658> public TableCellRenderer getCellRenderer(int row, int column) {
    3659> TableColumn tableColumn = getColumnModel().getColumn(column);
    3660> TableCellRenderer renderer = tableColumn.getCellRenderer();
    3661> if (renderer == null) {
    3662> renderer = getDefaultRenderer(getColumnClass(column));
    3663> }
    3664> return renderer;
    3665> }
    starting at line 3658 of their source code. It retrieves the TableCellRenderer on line 3660 by calling the tableColumn's getCellRenderer method. This is found in the TableColumn.java class:
    421> public TableCellRenderer getCellRenderer() {
    422> return cellRenderer;
    423> }
    See the problem? Only ONE cell Renderer. It's referring to a variable found at line 140 which is of type TableCellRenderer ... well actually it's created as a DefaultTableCellRenderer at some point since TableCellRenderer is an interface.
    Basically the fix is this:
    In the TableColumn.java file, a collection (Vector, LinkedList, whatever) needs to keep track of each cell's renderer. This will solve the solution. Of course this will be something that you or I can make.
    What's funny is the contradiction in documentation between JTable's and TableColumn's getCellRenderer() method. First, if we look at TableColumn's documentation it states:
    "Returns the TableCellRenderer used by the JTable to draw values for this column."
    Based on that first statement, the getCellRenderer() method in TableColumn is doing its job exactly. No lies, no contradictions in what it does.
    However, that method is called up inside of the JTable's getCellRenderer() method which says a completely different thing which is:
    "Returns an appropriate renderer for the cell specified by this row and column."
    Now we have a problem. For the cell specified. It appears that the rush to push this out blinded some developer who either:
    1) mis-interpreted what the JTable getCellRenderer() method was supposed to do and inadvertently added a feature or;
    2) was in a 2 a.m. blitz, wired on Pepsi and adrenalin and wrote the bug in.
    Either way, I'm really hoping that they'll fix this because it will take care of at least 2 bugs. Btw, anyone interested in posting a subclass to solve this problem (subclass of TableColumn) is more than welcome. I've spent much too much time on this and my project is already behind so I can't really afford any more time on this.
    later,
    a.

  • Why don't cells align top?

    First, I am a print designer and this web stuff is just too geeky for me. I never had a problem with this type of thing in FrontPage, but it seems to me like DW likes to do what it wants to do regardless of what you do with your mouse. What I mean by this is I click on something and it doesn't "stick".
    Anyway, I'm trying to make this simple little table (yes, tables, CSS is a programming language and I don't get it). I want the images and text to line up at the top of each cell. Used to be easy.
    Examples here:
    http://www.ashronbilling.com/wpe/waterproofing.html
    http://www.ashronbilling.com/wpe/decks.html
    http://www.ashronbilling.com/wpe/undertile.html
    WHY do the first item in waterproofing.html and the last item in undertile.html refuse to align top? Why do all items in decks work? I know I have messed around with these files because I get frustrated and then things just get weird and don't work. Every time I get to a point where I want to punch my monitor I start over and I end up with the same cr@p.
    Is there a heirarchy between HTML and CSS? Why can't you use JUST ONE? I think I'm compounding my problems by just trying to click on everything there is to click on. Don't have these problems in print...
    I appreciate your patience with me and just need someone to show me the way to do this correctly.

    waterproofing.html page:
    Paragraph tags have default margin and padding already set. You need to firstly zero it out by amending your paragraph style1 css as shown below. Then adjust how much space you want by adding some back in top, right, bottom, left. 0, 0, 0, 0.
    Also you have an extra } brace after your style8 css selector which will interfere with the css cascade if you don't remove it.
    .style1 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10pt;
        vertical-align: top;
    margin: 0 0 0 0;
    padding: 0 0 10px 0;
    .style8 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 14pt;
        color: #2260a6;
    } /* Delete this rogue bracket */
    .cell-top {
        vertical-align: top;
    undertile.html:
    I'd make sure you control the margin and the padding on the paragraph tags like the previous page.
    .style1 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 10pt;
        vertical-align: top;
    margin: 0 0 0 0;
    padding: 0 0 10px 0;
    Also you need to make sure the images in the left table cell are aligned to the top of the cell. By default they are aligned vertically in the middle of the cell.
    You could select the <td> cells individually, go to the properties inspector and select 'top' from the 'Vert' align pop up in the lower left corner.
    You could tell all content on your page to align to the top of the table cells with css:
    table td {
    vertical-align: top;
    Frustration WILL I'm afraid get the better of you unless you know how html and css work. There is no quick fix, its months and months of a steep learning curve, just like any other profession. It takes time and patience.

  • Read Only and HTML Table Cell Attributes

    Hi Guys,
    I believe i have come accross a bug - i'm been working on a form that can be filled out and printed - when going into print for sake of the output looking nice i set the form element to read-only.
    As soon as an element such as a drop down box, text feild, text area, etc which display as "[selected value]" in plain text in read only mode, are changed to the read only mode apex seem to ignore the html table cell attributes.
    For example i have a id number in the top left and then a version number in the top right. Both use a text feild; the top left uses 'width="100%"' for it's HTML Table Cell Attribute to push the right cell to the right. and the right cell has 'align="right"'. Now this works fine when read only is off... but as soon as read only is on, both the width and the alignment are totally ignored, and i can't find any sign of them in the code.
    Because this is for printing; using the "disable" on the form element instead of "read only" function, isn't appropriate as disabled will make the elements faded and hard to read when printed, and keeping the elements as is will allow the user to edit information on the print screen - which is not appropriate.
    Is this a bug? Will it be fixed soon? Is there any work around?
    Cheers,
    Alex

    Use the "Read Only Element Table Cell(s) Attributes" in the Read Only region of the Item edit form.
    Scott

  • How to left align the signature field of dynamic pdf

    Hi,
    I am working on dynamic (interactive) pdf and using Adobe LiveCycle Designer (Adobe Acrobat 9 Pro). My problem is that I cannot align left the signature field of my pdf. I can align left, right and center for textboxs and cannot just do that for signature field. When I couldn't do that from GUI I went to XML code for signature and tried this:
                       <para hAlign="left"/>  but it still didn't work. Ideally it should have worked.
    I would really appreciate if you could help me.
    Regards,
    Kiran

    Use skinning. Use the following skin selector:
    af|panelFormLayout::label-cell {text-align: left; }If you want to apply it only on particular panelFormLayout, then set a custom styleClass on the given <af:panelFormLayout> tag (for example, <af:panelFormLayout styleClass="MyStyleClass" ... >) and use a styleClass-dependent skin selector:
    af|panelFormLayout.MyStyleClass::label-cell {text-align: left; }Adding a custom skin is easy. If you do not know how, see this topic in the documentation: 20.2 Applying Custom Skins to Applications
    Dimitar

  • TableView: column header text alignment?

    How can I change the text alignment of a TableView column caption/header? I'd like some of my column headers to be right aligned for example?
    It works for regular table cells when I change f.i. the css of the custom DataFX MoneyTableCell cell:
    .money-cell {
       -fx-alignment: TOP_RIGHT;
    }but it won't work for the ".table-view .column-header" style of the standard TableView:
    .table-view .column-header,
    .table-view .filler,
    .table-view .column-drag-header {
        -fx-alignment: TOP_RIGHT;
    }

    Just after raising this I realised the problem is that the text is a label on top of the header. You can right align by using the following selector:
    .table-view .column-header .label {
        -fx-alignment: TOP_RIGHT;
    }

  • Nested Tables alignment challenge?

    Thanks to wonderful folk here on the forum, I have been
    directed in learning more about tables. I have learned how to
    create nested tables however for some strange reason, I can't get
    one of my tables to align. Please see this at
    www.wms-ec5.com/wms/wms-cur.html. You'll see just above the tree on
    the left the nested table drops down from the top. I managed to
    align the right column just fine, but this one will not. Can anyone
    offer suggestions. The picture and cell are aligned at the 'Top'.
    What am I missing?? thanks for any help / suggestions.

    I don't see any drop in IE6....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "malbuddy" <[email protected]> wrote in
    message
    news:ef1jkn$iv1$[email protected]..
    > Thanks to wonderful folk here on the forum, I have been
    directed in
    > learning
    > more about tables. I have learned how to create nested
    tables however for
    > some
    > strange reason, I can't get one of my tables to align.
    Please see this at
    > www.wms-ec5.com/wms/wms-cur.html. You'll see just above
    the tree on the
    > left
    > the nested table drops down from the top. I managed to
    align the right
    > column
    > just fine, but this one will not. Can anyone offer
    suggestions. The
    > picture
    > and cell are aligned at the 'Top'. What am I missing??
    thanks for any
    > help /
    > suggestions.
    >

  • How to center align request Title

    The deafult for the request title is left. Is there a way to center align? The only way I was able to achieve this was to indent left and right padding under additional formatting options. Cell Horizontal alignment does not do anything

    BISP wrote:
    The deafult for the request title is left. Is there a way to center align? The only way I was able to achieve this was to indent left and right padding under additional formatting options. Cell Horizontal alignment does not do anythingThe "A" that you need to click on is NOT the one that is in the Title section when viewing the report in the Compound Layout.
    What you have to do is, while in the Compound Layout view, click on the middle icon, the one that looks like a pencil. In other words, you have to go to the design editor of the Title View.
    Here is where you find another "A" to the right of where the title field is. Click it and change the horizontsl alignment there. That will center your title.

Maybe you are looking for

  • Smart Fan Noise control feature in G580

    Hi.....I have G580. I found that there is no control option for smart fan,noise control feature.Please tell me how to use it, Thanks in advance

  • Buginfos on 10.1.0.4 Patch 11

    Can anybody tell some detailed info about the bug 4041977 - ACCESS DRIVER FAILS TO QUERY AN EXTERNAL TABLE ACROSS DB LINK i could find it in the metalink document-id search.

  • Third Party Router and Apple File Protocol

    Hi, I'm not quite sure, if this is the right forum for my question. I use a Siemens Gigaset SE505 (ADSL2) Router for my WiFi Network and for the communication with my ISP. Before that I just used a switch, ethernet cables and no ISP-connection. So i

  • "tap to click" unchecked

    Hi everyone, after the latest update, each time I reboot my MacBook, my "tapping" doesn't work. Each time, "tap to click" is unchecked in the System Prefersences. It never did like this before. Why now? What's going on?

  • Iphone 5 cant startup after charge for few hours

    iphone 5 cant startup after charge for few hours, what can i do?