How to set table alternating color

how do i set the properties of table with alternating color
properties :
design : alternating  
it is like normal table , although i have change the properties of design to alternating.....
pls advice

Hi Yzme,
When you change the Table Design propety to "<b>alternate</b>", change the <b>readOnly </b>property to <b>"true</b>". Then the table will display the alternate colors but the table will be read only.
Refer to the following thread also:
Re: Problem with table design in 2004s
Regards,
Jhansi

Similar Messages

  • How can i set the alternating colors for a table rows

    Dear All,
    Please any one help me how can i set the Alternating colors for Table Rows.
    i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.

    Hi,
    The design property in Table properties should work for your requirement. Select "alternating" value for design.
    Please see the API below:
    design
    Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
    alternating - The table rows are displayed alternately in a different color.
    standard - The table background has one color. The individual table rows are displayed with grid net lines.
    transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
    Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
    Regards,
    Jaya.
    Edited by: VJR on Jun 17, 2009 6:43 PM

  • How to set a HTML color to a control button

    How to set a fixed color to a disabled button?
    I have a boolean button which has 3 status: on, off and disabled. I don't like the 'grayed and disabled' option. I will use red for off, green for on, and white gray (foreground color) for the disabled status. The HTML color code is BDBDBD. I tried to send the hex number 'BDBDBD' to the button property node 'color[4]' but was told that I was wiring to the wrong type of terminal.
    Could any one post a sample code of how to construct the structure of 'color[4]' using a RRGGBB number?
    Thanks,
    Ryan

    What exectly do you want and do you see.
    If I run the code you have in LabVIEW 9.0, I get the following result after running.
    For convenience I have shown the second color array you set as color indicators:
    Note that you use grey as the colors for True and False
    Here I have set made the colors more distinct:
    Ton
    Message Edited by TCPlomp on 07-10-2009 08:00 AM
    Message Edited by TCPlomp on 07-10-2009 08:01 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    ButtonColor_FP.png ‏17 KB
    ButtonColorMoreColor_FP.png ‏18 KB

  • How 2 set the background color in j2me

    Can any body tell me how to set the background color to midlet.??

    if you are using Screen then you can call its setBackColor()
    or if you are using Canvas then you can call
    g.setColor(r,g,b);
    g.fillRect(0,0,getWidth,getHieght);
    where g is the Graphics instance of Canvas,for further information consult documentation

  • How to set table cell renderer in a specific cell?

    how to set table cell renderer in a specific cell?
    i want set a cell to be a button in renderer!
    how to do?
    any link or document can read>?
    thx!

    Take a look at :
    http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
    It is very interesting, and I think your answer is here.
    Denis

  • How to set dash line color(two colors)?

    hello all:
    Does anyone know how to set dash line color in java?
    I only know how to set line color with a single color.
    g2.setColor(Color.black);
    g2.setStroke(dashed);
    g2.draw(new Rectangle2D.Double(50, 50, 200,100));
    what I need to implement is two colors interleave on the dash line.
    so that dash line looks like this:
    ==== ====
    red white red white
    thank you for any comments.
    -Daniel.

    create 2 strokes, space them appropriately, draw the rectangle twice.

  • How to Replicate Standard Alternating Colors using XSL-FO??

    Hi All
    I am using Apex_3.1, Apache fop and Standard Report Printing to produce PDF reports. We would like to replicate the theme 12 (Blue) standard alternating colors in our PDF output.
    I do realise that this involves modifying the xsl-fo and have tried putting color attributes in the xsl-fo (Generic Columns). I know I can just put the color in the apex print settings but that doesn't give me the alternating colors.
    Edited by: Keith Jamieson on Oct 22, 2009 4:04 PM

    I believe this is the section of the xsl template that needs modified.
                       <fo:table-body>
                            <xsl:for-each select=".//ROW">
                               <fo:table-row >
                                      #PRN_TEMPLATE_BODY_ROW#
                               </fo:table-row>
                            </xsl:for-each>
                         </fo:table-body>and I have found this example which appears to do what I require.
    <xsl:template name="table.row.properties">
      <xsl:variable name="tabstyle">
        <xsl:call-template name="tabstyle"/>
      </xsl:variable>
      <xsl:variable name="bgcolor">
        <xsl:call-template name="dbfo-attribute">
          <xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
          <xsl:with-param name="attribute" select="'bgcolor'"/>
        </xsl:call-template>
      </xsl:variable>
      <xsl:variable name="rownum">
        <xsl:number from="tgroup" count="row"/>
      </xsl:variable>
      <xsl:choose>
        <xsl:when test="$bgcolor != ''">
          <xsl:attribute name="background-color">
            <xsl:value-of select="$bgcolor"/>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="$tabstyle = 'striped'">
          <xsl:if test="$rownum mod 2 = 0"
            <xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
          </xsl:if>
        </xsl:when>
      </xsl:choose>
    </xsl:template>Every time I try and add that section to the code, I end up breaking it and not getting any pdf output :(
    eg my latest attempt
    <?xml version = '1.0' encoding = 'utf-8'?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink">
          <xsl:variable name="_XDOFOPOS" select="''"/>
          <xsl:variable name="_XDOFOPOS2" select="number(1)"/>
          <xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
        <xsl:variable name="_XDOFOOSTOTAL" select="number(0)"/>
         <xs1:variable name="rownum" />
      <xsl:choose>
        <xsl:when test="$bgcolor != ''">
          <xsl:attribute name="background-color">
            <xsl:value-of select="$bgcolor"/>
          </xsl:attribute>
        </xsl:when>
        <xsl:when test="$tabstyle = 'striped'">
          <xsl:if test="$rownum mod 2 = 0">
            <xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
          </xsl:if>
        </xsl:when>
      </xsl:choose>
       <xsl:attribute-set name="padding">
          <xsl:attribute name="padding-bottom">0.25pt</xsl:attribute>
          <xsl:attribute name="padding-top">0.25pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="text">
          <xsl:attribute name="text-align">start</xsl:attribute>
          <xsl:attribute name="orphans">2</xsl:attribute>
          <xsl:attribute name="start-indent">0.0pt</xsl:attribute>
          <xsl:attribute name="linefeed-treatment">preserve</xsl:attribute>
          <xsl:attribute name="padding-top">0.0pt</xsl:attribute>
          <xsl:attribute name="end-indent">0.0pt</xsl:attribute>
          <xsl:attribute name="padding-bottom">0.0pt</xsl:attribute>
          <xsl:attribute name="height">0.0pt</xsl:attribute>
          <xsl:attribute name="widows">2</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="align-left">
          <xsl:attribute name="text-align">left</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="align-center">
          <xsl:attribute name="text-align">center</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="align-right">
          <xsl:attribute name="text-align">right</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="footer">
          <xsl:attribute name="text-align">right</xsl:attribute>
          <xsl:attribute name="start-indent">5.4pt</xsl:attribute>
          <xsl:attribute name="end-indent">5.4pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="text_2">
          <xsl:attribute name="start-indent">5.4pt</xsl:attribute>
          <xsl:attribute name="end-indent">23.4pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="text_20">
          <xsl:attribute name="height">13.872pt</xsl:attribute>
          <xsl:attribute name="end-indent">5.4pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="text_0">
          <xsl:attribute name="end-indent">5.4pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="page-header">
          <xsl:attribute name="color">#PAGE_HEADER_FONT_COLOR#</xsl:attribute>
          <xsl:attribute name="font-family">#PAGE_HEADER_FONT_FAMILY#</xsl:attribute>
          <xsl:attribute name="white-space-collapse">false</xsl:attribute>
          <xsl:attribute name="font-size">#PAGE_HEADER_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-weight">#PAGE_HEADER_FONT_WEIGHT#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="page-footer">
          <xsl:attribute name="color">#PAGE_FOOTER_FONT_COLOR#</xsl:attribute>
          <xsl:attribute name="font-family">#PAGE_FOOTER_FONT_FAMILY#</xsl:attribute>
          <xsl:attribute name="white-space-collapse">false</xsl:attribute>
          <xsl:attribute name="font-size">#PAGE_FOOTER_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-weight">#PAGE_FOOTER_FONT_WEIGHT#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="body-font">
          <xsl:attribute name="height">12.0pt</xsl:attribute>
          <xsl:attribute name="font-family">#BODY_FONT_FAMILY#</xsl:attribute>
          <xsl:attribute name="white-space-collapse">false</xsl:attribute>
          <xsl:attribute name="font-size">#BODY_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-weight">#BODY_FONT_WEIGHT#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="page-number">
          <xsl:attribute name="height">13.872pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="header-font">
          <xsl:attribute name="height">#HEADER_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-family">#HEADER_FONT_FAMILY#</xsl:attribute>
          <xsl:attribute name="white-space-collapse">false</xsl:attribute>
          <xsl:attribute name="font-size">#HEADER_FONT_SIZE#pt</xsl:attribute>
          <xsl:attribute name="font-weight">#HEADER_FONT_WEIGHT#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="border">
          <xsl:attribute name="border-top">#BORDER_WIDTH#pt solid #BORDER_COLOR#</xsl:attribute>
          <xsl:attribute name="border-bottom">#BORDER_WIDTH#pt solid #BORDER_COLOR#</xsl:attribute>
          <xsl:attribute name="border-start-width">#BORDER_WIDTH#pt</xsl:attribute>
          <xsl:attribute name="border-start-color">#BORDER_COLOR#</xsl:attribute>
          <xsl:attribute name="border-start-style">solid</xsl:attribute>
          <xsl:attribute name="border-end-width">#BORDER_WIDTH#pt</xsl:attribute>
          <xsl:attribute name="border-end-color">#BORDER_COLOR#</xsl:attribute>
          <xsl:attribute name="border-end-style">solid</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="cell">
          <xsl:attribute name="background-color">#BODY_BG_COLOR#</xsl:attribute>
          <xsl:attribute name="color">#BODY_FONT_COLOR#</xsl:attribute>
          <xsl:attribute name="padding-start">5.15pt</xsl:attribute>
          <xsl:attribute name="vertical-align">top</xsl:attribute>
          <xsl:attribute name="padding-top">0.0pt</xsl:attribute>
          <xsl:attribute name="padding-end">5.15pt</xsl:attribute>
          <xsl:attribute name="number-columns-spanned">1</xsl:attribute>
          <xsl:attribute name="height">0.0pt</xsl:attribute>
          <xsl:attribute name="padding-bottom">0.0pt</xsl:attribute>
       </xsl:attribute-set>
       <xsl:attribute-set name="header-color">
          <xsl:attribute name="background-color">#HEADER_BG_COLOR#</xsl:attribute>
          <xsl:attribute name="color">#HEADER_FONT_COLOR#</xsl:attribute>
       </xsl:attribute-set>
       <xsl:template match="/">
          <fo:root>
             <fo:layout-master-set>
                <fo:simple-page-master master-name="master0" margin-left="66.6pt" margin-right="66.6pt" page-height="#PAGE_HEIGHT#pt" page-width="#PAGE_WIDTH#pt" margin-top="36.0pt" margin-bottom="36.0pt">
                   <fo:region-before region-name="region-header" extent="54.0pt"/>
                   <fo:region-body region-name="region-body" margin-top="54.0pt" margin-bottom="54.0pt"/>
                   <fo:region-after region-name="region-footer" extent="54.0pt" display-align="after"/>
                </fo:simple-page-master>
             </fo:layout-master-set>
             <fo:page-sequence master-reference="master0">
                <xsl:variable name="_PW" select="number(#PAGE_HEIGHT#)"/>
                <xsl:variable name="_PH" select="number(#PAGE_WIDTH#)"/>
                <xsl:variable name="_ML" select="number(72.0)"/>
                <xsl:variable name="_MR" select="number(72.0)"/>
                <xsl:variable name="_MT" select="number(90.0)"/>
                <xsl:variable name="_MB" select="number(90.0)"/>
                <xsl:variable name="_HY" select="number(36.0)"/>
                <xsl:variable name="_FY" select="number(36.0)"/>
                <xsl:variable name="_SECTION_NAME" select="string('master0')"/>
                <fo:static-content flow-name="region-header">
                   <fo:block xsl:use-attribute-sets="text text_2 text_0 #PAGE_HEADER_ALIGNMENT#">
                      <fo:inline xsl:use-attribute-sets="page-header">#PAGE_HEADER#</fo:inline>
                   </fo:block>
                </fo:static-content>
                <fo:static-content flow-name="region-footer">
                   <fo:block xsl:use-attribute-sets="text footer">
                      <fo:inline xsl:use-attribute-sets="body-font page-number">
                         <fo:page-number/>
                      </fo:inline>
                   </fo:block>
                   <fo:block xsl:use-attribute-sets="text text_2 #PAGE_FOOTER_ALIGNMENT#">
                      <fo:inline xsl:use-attribute-sets="page-footer">#PAGE_FOOTER#</fo:inline>
                   </fo:block>
                </fo:static-content>
                <fo:flow flow-name="region-body">
                   <fo:block xsl:use-attribute-sets="padding">
                      <fo:table start-indent="0.0pt">
                         <xsl:variable name="_XDOFOPOS2" select="number(1)"/>
                         <xsl:variable name="_XDOFOTOTAL" select="number(1)"/>
                         #PRN_TABLE_CELLS#
                         <fo:table-header>
                            <fo:table-row>
                               #PRN_TEMPLATE_HEADER_ROW#
                            </fo:table-row>
                         </fo:table-header>
                         <fo:table-body>
                            <xsl:for-each select=".//ROW">
                               <xs1:choose>
                                  <xs1:when> test = ".//ROW mod 2 = 0"
                               <fo:table-row bgcolor=#EEEEEE>
                                      #PRN_TEMPLATE_BODY_ROW#
                               </fo:table-row>
                                  </xs1:when>
                                  <xs1:when> test = ".//ROW mod 1 = 0"
                               <fo:table-row bgcolor=#DDDDDD>
                                      #PRN_TEMPLATE_BODY_ROW#
                               </fo:table-row>
                                   </xs1>                          
                            </xsl:for-each>
                         </fo:table-body>
                      </fo:table>
                   </fo:block>
                   <fo:block xsl:use-attribute-sets="text text_2 text_20">
                      <fo:inline id="{concat('page-total-', $_SECTION_NAME, $_XDOFOPOS)}"/>
                      <fo:inline id="{concat('page-total', $_XDOFOPOS)}"/>
                   </fo:block>
                </fo:flow>
             </fo:page-sequence>
          </fo:root>
       </xsl:template>
    </xsl:stylesheet>

  • How to set the Background Color of a Text Field in a Tabular Report.

    Hello,
    I tried to set the Background Color of a Text Field in a Tabular Report.
    But I was not able to change this colur.
    In the report attributes --> column attributes
    I tried already:
    1. Column Formating -- >CSS Style (bgcolor: red)
    2. Tabular Form Element --> Element Attributes (bgcolor: red)
    but nothing worked.
    Can anybody help me?
    I Use Oracle Apex 2.2.1 on 10gR2
    thank you in advance.
    Oliver

    in "Report Attributes" select the column to move to the "Column Attributes" page. In the "Element Attributes" field under the "Tabular Form Element" region enter
    style="background-color:red;"
    I will also check if there is a way to do this via the template and post here again
    edit:
    in your template definition, above the template, enter the following:
    < STYLE TYPE="text/css" >
    .class INPUT {background-color:red;}
    < /STYLE >
    (remove the spaces after the < and before the >)
    change "class" to the class that the template is calling
    (I'm using theme 9, the table has: class="t9GCCReportsStyle1" so I would enter t9GCCReportsStyle1)
    A side-effect of using this second version is that ALL input types will have a red background color--checkboxes, input boxes, etc.
    Message was edited by:
    TheJosh

  • How to set table field mantatary in data dictinary?

    how to set the table field mantatary in data dictinary?
    exampl
    null value not allowed.

    hi,
    check this.
    [https://forums.sdn.sap.com/click.jspa?searchID=19187532&messageID=2575276]

  • How to change table border color in DW CS6

    I need to know how to change the color of the border around my tables in Dreamweaver CS6. I saw a article on how to change it on http://forums.adobe.com/message/4451812, but i really couldnt follow because im just starting out using dreamweaver and i dont know anything about code. Is there a simple way to change the border color or can you give me a basic step process on how to change the border color in the code?

    Just an FYI, nobody uses Table-based layouts anymore.  It's much better to use CSS for layouts.  Only use tables for tabular data like spreadsheets and charts.
    Dreamweaver has a bunch of pre-built CSS Layouts for you to use as starter pages.  Just go to File > New > Blank page > HTML.  Pick a layout from the 3rd panel and hit Create button.  See screenshot below.
    Nancy O.

  • How to set foreground gradent color to label???

    using this i can set background gradentcolor to label. But how to set foreground gradentcolor to label???
    JLabel compname = new JLabel("ARDENT TECHNOLOGIES INC")
              protected void paintComponent(Graphics g)
                { int width = getWidth();
                int height = getHeight();
                GradientPaint paint = new GradientPaint(0, 0,  Color.blue, width, height, Color.green);
                Graphics2D g2d =(Graphics2D)g;
                g2d.setPaint(paint);
                g2d.fillRect(0, 0, width,height);           
                super.paintComponent(g); } };
                compname.setOpaque( false );Thanks in advance
    raja

    reply #3 looks interesting
    http://forum.java.sun.com/thread.jspa?forumID=257&threadID=481290

  • How to set a background color to view

    Hi All,
              i creared a view with 2 textboxes and a button.These elements are in TransparentContainer.I set the background color to the TransparentContainer.By setting color to the TransparentContainer it is comming at the center and the 4 sides of it is displaying in the normal background color of the browser
    i didnt find any color options for the view called RootUIElementContainer.the width and height of the view are setted to the browser means 1024*768.
    Just like sap editor which we get by the link https://www.sdn.sap.com i want to get my view .....
    I want to set color to this RootUIElementContainer element which effect the whole view...not the containers or groups which i add under this RootUIElementContainer
    Regards
    Padma N

    hi Padma,
    For changing the background colour you will have to make the change in the theme.
    You can download the theme editor plugin for eclipse from SDN. With this plugin, you can make changes to the default themes , save as a new theme
    Or if you are using portal, then goto system administrator, theme editor, select SAP Streamline and change the color in Screen areas -> application, then save the theme with different name.
    Best regards,
    Sangeeta

  • How to set image background color ?

    Hi All,
    In my project i have image,and if image have black spot or any unwanted spot then i will select that area and say clear it then it will remove that spot and set color of that area similar to area around that spot.
    I have written code for getting pixel color of selected area in image like this
    BufferedImage old_image = ImageIO.read(new File(myFile));
    int[] pixels = new_image.getRGB(0, 0,new_image.getWidth(), new_image.getHeight(),null, 0, new_image.getWidth());
    for (int i = 0; i < pixels.length; i++) {
    Color pixelColor = new Color(pixels);
    System.out.println("RGB ::"+pixelColor.getRGB());
    RGB returning negative value;
    Please tell me correct way how can i do this.
    It's very urgent.
    Thanks in advance.
    Thanks
    AP.

    i found the browser fill button.  Now how do I fill the browser fill with an image?

  • How to set cell background color for JCheckBox renderer in JTable?

    I need to display table one row with white color and another row with customized color.
    But Boolean column cannot set color background color.
    Here is my codes.
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.TreeSet;
    public class BooleanTable extends JFrame
        Object[][] data = {{Boolean.TRUE},{Boolean.TRUE},{Boolean.TRUE},{Boolean.TRUE},{Boolean.TRUE},{Boolean.TRUE}};
        String[] header = {"CheckBoxes"};
        public BooleanTable()
            setDefaultCloseOperation( EXIT_ON_CLOSE );
            TableModel model = new AbstractTableModel()
                public String getColumnName(int column)
                    return header[column].toString();
                public int getRowCount()
                    return data.length;
                public int getColumnCount()
                    return header.length;
                public Class getColumnClass(int columnIndex)
                    return( data[0][columnIndex].getClass() );
                public Object getValueAt(int row, int col)
                    return data[row][col];
                public boolean isCellEditable(int row, int column)
                    return true;
                public void setValueAt(Object value, int row, int col)
                    data[row][col] = value;
                    fireTableCellUpdated(row, col);
            JTable table = new JTable(model);
            table.setDefaultRenderer( Boolean.class, new MyCellRenderer() );
            getContentPane().add( new JScrollPane( table ) );
            pack();
            setLocationRelativeTo( null );
            setVisible( true );
        public static void main( String[] a )
            try
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch( Exception e )
            new BooleanTable();
        private class MyCellRenderer extends JCheckBox implements TableCellRenderer
            public MyCellRenderer()
                super();
                setHorizontalAlignment(SwingConstants.CENTER);
            public Component getTableCellRendererComponent(JTable
                                                           table, Object value, boolean isSelected, boolean
                                                           hasFocus, int row, int column)
                if (isSelected) {
                   setForeground(Color.white);
                   setBackground(Color.black);
                } else {
                   setForeground(Color.black);
                   if (row % 2 == 0) {
                      setBackground(Color.white);
                   } else {
                      setBackground(new Color(239, 245, 217));
                setSelected( Boolean.valueOf( value.toString() ).booleanValue() );
             return this;
    }

    Instead of extending JCheckBox, extend JPanel... put a checkbox in it. (border layout center).
    Or better yet, don't extend any gui component. This keeps things very clean. Don't extend a gui component unless you have no other choice.
    private class MyCellRenderer implements TableCellRenderer {
        private JPanel    _panel = null;
        private JCheckBox _checkBox = null;
        public MyCellRenderer() {
            //  Create & configure the gui components we need
            _panel = new JPanel( new BorderLayout() );
            _checkBox = new JCheckBox();
            _checkBox.setHorizontalAlignment( SwingConstants.CENTER );
            // Layout the gui
            _panel.add( _checkBox, BorderLayout.CENTER );
        public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) {
            if( isSelected ) {
               _checkBox.setForeground(Color.white);
               _panel.setBackground(Color.black);
            } else {
               _checkBox.setForeground(Color.black);
               if( row % 2 == 0 ) {
                  _panel.setBackground(Color.white);
               } else {
                  _panel.setBackground(new Color(239, 245, 217));
            _checkBox.setSelected( Boolean.valueOf( value.toString() ).booleanValue() );
            return _panel;
    }

  • How to set selected text color in Spark TextInput

    I'm trying to make Spark TextInputs and MXFTETextInputs look like Halo/MX TextInputs as much as possible, since I have a mix of both Spark and MX TextInputs in my application. I know I can set the
    selection background color to black using focusedTextSelectionColor. How can I set the selected text color to white so it matches the MX white-on-black look?

    This works, if you set the enabled property directly on the s:TextInput:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx">
        <s:layout>
            <s:VerticalLayout horizontalAlign="center" verticalAlign="middle" />
        </s:layout>
        <s:controlBarContent>
            <s:CheckBox id="ch" label="enabled" selected="true" />
        </s:controlBarContent>
        <fx:Style>
            @namespace s "library://ns.adobe.com/flex/spark";
            @namespace mx "library://ns.adobe.com/flex/mx";
            s|TextInput:disabled {
                color: red;
        </fx:Style>
        <s:Group>
            <s:TextInput id="ti" text="The quick brown fox jumps over the lazy dog" enabled="{ch.selected}" />
        </s:Group>
    </s:Application>
    It can get a bit trickier when you're setting the enabled property on a parent container, since (I believe) that the child control's enabled properties are still set to true and just the container is disabled. One possible workaround would be to bind the child TextInput control's enabled property to the container's enabled property. That way the s:TextInput should still go to it's disabled state and you can customize the disabled state's styles to have darker text, or whatever else you want.
    <s:Group id="gr" enabled="{ch.selected}">
        <s:TextInput id="ti" text="The quick brown fox jumps over the lazy dog" enabled="{gr.enabled}" />
    </s:Group>
    Peter

Maybe you are looking for

  • How do I select a Contacts group in iCloud

    I don't want my Mac's list of All Contacts on my portable devices.  iTunes let's me synch a selected group of contacts.  Can I do this in iCloud?  Also, now that iCloud has pushed All Contacts onto my iPhone, how do I remove it from both places (iClo

  • Write CLOB XML output to a file on UNIX box (file size 32 K)

    All, Can someone give me a sample code of how to write a CLOB output in a CLOB variable (holds XML output generated from DBMS_XMLQUERY) to a text file on UNIX box? I found on ask tom a technique which only write upto 32K length. My CLOB output is mor

  • Views, not updatable???

    Have run the script demobld.sql in schema SCOTT/TIGER and created the following view SQL> @C:\scripts\demobld.sql Building demonstration tables. Please wait. Demonstration table build is complete. CREATE OR REPLACE VIEW empdept AS SELECT emp.empno, e

  • Publisher File Question

    Why does a mail-merge in MS Publisher split into multiple files when printed as a pdf file?

  • Install datamining and unicode support using dbca template

    Hi All We are creating a 11g release 1 db on linux using the Amazon AMI. There is this script in /home/oracle/run_dbca.sh And we would like to have uni-code support so we can display Chinese/Japanese or whatever multibyte character. We would also lik