Template Cell Background Color

Hi,
I'm creating Dreamweaver templates with the pages built from them being edited in Contribute.  There is a need for the Contribute users to be able to change the background color of individual cells in a table (on a page built from a DWT).  I can't figure out how to make this happen.  The rows are repeating regions.  If I make an editable attribute then it applies to every row.  I can't use ID's because with repeating regions they are not unique.  If the user right-clicks a cell (a cell that is an editable region of course) and chooses a style, that style is applied to the contents of the cell via a span and not to the cell itself.  Any ideas?
Thanks,
Doug

Nancy O.
Not looking for alternating colours.  Here is an example of what I want:
Header 1
Header 2
Header 3
blah
blah
bgcolor here is white
blah
blah
bgcolor here is red
blah
blah
bgcolor here is yellow
blah
blah
bgcolor here is green
Keeping in mind that the table would have started out as one repeatable row and the Contribute user would add the rest.

Similar Messages

  • Right way to change datagrid row, column, cells background colors in code-behind?

    Hi all,
    I have a winform program that I'm upgrading to wpf (I'm new to wpf). The wpf code for the function (SetdataGridBackgroundColors()) is below with the winform code commented out so I can fix it.  I have a datagrid with a Cornsilk background color alteranating
    with LightGreen depending on the content of datetime  cell. If the day portion of the datetime is different then the color changes from one to the other. I used a colorIndex variable because at the end of the month it could go from 31 to 1 and that would
    not work if I use the day directly.
    I tried this line to change the background color:
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk);
    this works but it changes every row. I found this other stuff:
    DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    Either ContainerFromIndex or ContainerFromItem throw an exception because currentRowColor is null. I looked at optionsDataDatagrid.Items[i] and is not null. Then I read that using ItemContainerGenerator is not a good idea.
    BTW I'm calling SetdataGridBackgroundColors() after datagrid is been filled with data.
    So... what is the proper way to set each row, column or cell background color in wpf?
    Thanks
    private void SetdataGridBackgroundColors()
    optionRowData rowData = new optionRowData();
    if (optionsDataDatagrid.Items.Count == 0)
    return;
    int colorIndex = 1;
    DateTime savedDate, currentRowDate;
    rowData = optionsDataDatagrid.Items[0] as optionRowData;
    savedDate = rowData.col_datetime.Date; //only compare the date not the time
    for (int i = 0; i < optionsDataDatagrid.Items.Count; i++)
    //currentRowDate = Convert.ToDateTime(optionsDataDatagrid.Rows[i].Cells[3].Value); //winform code
    //currentRowDate = currentRowDate.Date; //winform code
    rowData = optionsDataDatagrid.Items[i] as optionRowData;
    currentRowDate = rowData.col_datetime.Date;
    if (currentRowDate != savedDate)
    colorIndex++;
    savedDate = currentRowDate;
    if (colorIndex % 2 == 0)
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.Cornsilk;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.Cornsilk); //this changes all rows
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromIndex(i) as DataGridRow;
    //DataGridRow currentRowColor = optionsDataDatagrid.ItemContainerGenerator.ContainerFromItem(optionsDataDatagrid.Items[i]) as DataGridRow;
    //currentRowColor.Background = new SolidColorBrush(Colors.Cornsilk);
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.DarkSalmon;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.Aquamarine;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);
    else
    //optionsDataDatagrid.Rows[i].DefaultCellStyle.BackColor = Color.LightGreen;
    //------------------- testing new code --------------begin
    optionsDataDatagrid.RowBackground = new SolidColorBrush(Colors.LightGreen); //this has no effect
    //------------------- testing new code --------------end
    //optionsDataDatagrid.Columns[4].DefaultCellStyle.BackColor = Color.Coral;
    //optionsDataDatagrid.Columns[5].DefaultCellStyle.BackColor = Color.LimeGreen;
    //optionsDataDatagrid.Rows[i].Cells[4].Style.ApplyStyle(optionsDataDataGridView.Columns[4].DefaultCellStyle);
    //optionsDataDatagrid.Rows[i].Cells[5].Style.ApplyStyle(optionsDataDataGridView.Columns[5].DefaultCellStyle);

    I (also) strongly recommend mvvm.
    Setting values is a particularly bad idea in this case.
    I don't mean to be rude but your explanation of the requirement is kind of vague.
    I would bind solidcolourbrushes.
    Set the properties based on whatever your logic is within the viewmodel.
    You can switch out what each of the brushes holds when the user clicks wherever.
    So you use a highlightbrush when something or other is true.
    That highlightbrush is set to a blue brush when the user clicks left and a red brush when they click right.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • Cell background colors are not showing in preview - help? - DW4

    Hi,
    I created a horizontal table for my menu bar, and gave each cell a different color by creating a separate class for each with background image - image is a block of color created in Photoshop. In design mode they look they way I want, but in preview (Safari) the colors don't show up at all - the whole area is gray, and all I see is the text for each cell. Can someone tell me what I'm doing wrong? Alternatively, is there a better way I can set this up to have different colors for each button?
    Thank you!

    Here is the HTML code, and the CSS code for the menu bar follows: 
         ul.MenuBarHorizontal           
    ></style><style type="text/css"><!body {     background-color: #FFF;     font-family: Arial, Helvetica, sans-serif;}-->
        h1.  
         ul.MenuBarVertical          
    [about | MS_about.html]
    [fiction | MS_fiction.html]
    [dramatic work | MS_dramaticwork.html]
    [arts | MS_arts.html]
    [contact | MS_contact.html]
    [blog | MS_blog.html]
    <!-- end #header ><div id="mainContent"><p> </p><table width="950" border="0" cellspacing="10" cellpadding="12">        <tr>          <td width="106"><p> </p></td>          <td width="766"><p> </p>            <p>Miriam Seidel is a writer, critic and curator whose work is informed by her background in art, music and dance. </p>          <p> </p>          <p> </p>          <p> </p>          <p> </p>          <p> </p>          <p> </p>          <p> </p>          <p> </p>          <p> </p>          <p> </p>          <p> </p></td>        </tr>        <tr>          <td colspan="2" bgcolor="#CCCCCC"><p>c Miriam Seidel 2011 all rights reserved</p></td>        </tr>    </table><script type="text/javascript"><!var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", );var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", );var MenuBar3 = new Spry.Widget.MenuBar("MenuBar3", );//></script></body>     <! end #mainContent --></div></html> 
    CSS CODE:
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */ 
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding /ul.MenuBarHorizontal/ Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html /ul.MenuBarActive{     z-index: 1000;     font-family: Arial, Helvetica, sans-serif;     font-size: medium;     color: #FFF;     background-color: #FFCC99;     background-repeat: no-repeat;     left: auto;     top: auto;     right: auto;     bottom: auto;}/ Menu item containers, position children relative to this container and are a fixed width /ul.MenuBarHorizontal li/ Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) /ul.MenuBarHorizontal ul/ Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item /ul.MenuBarHorizontal ul.MenuBarSubmenuVisible/ Menu item containers are same fixed width as parent /ul.MenuBarHorizontal ul li/ Submenus should appear slightly overlapping to the right (95%) and up (-5%) /ul.MenuBarHorizontal ul ul/ Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible 
    /* Submenu containers have borders on all sides /ul.MenuBarHorizontal ul/ Menu items are a light gray block with padding and no text decoration /ul.MenuBarHorizontal a/ Menu items that have mouse over or focus have a blue background and white text /ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus{     background-color: #6C9;     color: #999;     font-family: Arial, Helvetica, sans-serif;     font-size: medium;     font-style: normal;     line-height: normal;     font-weight: normal;     font-variant: normal;     text-decoration: none;     text-align: center;     vertical-align: middle;     height: 50px;     width: 115px;}/ Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible{     background-color: #FFCC99;     color: #FFF;     font-family: Arial, Helvetica, sans-serif;     text-decoration: none;     font-size: medium;}
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) /ul.MenuBarHorizontal a.MenuBarItemSubmenu{     background-image: url(SpryMenuBarDown.gif);     background-repeat: no-repeat;     background-position: 95% 50%;     text-align: center;}/ Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) /ul.MenuBarHorizontal ul a.MenuBarItemSubmenu{     background-image: url(SpryMenuBarRight.gif);     background-repeat: no-repeat;     background-position: 95% 50%;}/ Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) /ul.MenuBarHorizontal a.MenuBarItemSubmenuHover{     background-image: url(SpryMenuBarDownHover.gif);     background-repeat: no-repeat;     background-position: 95% 50%;}/ Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover{     background-image: url(SpryMenuBarRightHover.gif);     background-repeat: no-repeat;     background-position: 95% 50%;}
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe /ul.MenuBarHorizontal iframe/ HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */@media screen, projection{     ul.MenuBarHorizontal li.MenuBarItemIE     {          display: inline;          f\loat: left;          background: #FFF; 
    Date: Mon, 20 Jun 2011 15:30:46 -0600
    From: [email protected]
    To: [email protected]
    Subject: Re: cell background colors are not showing in preview - help? - DW4 
    NEED to see the code.
    Otherwise it's like dialing a random phone number, and asking whoever answers, where you left your keys.
    >

  • Is it possible to apply conditional formatting to a cell (or range) based upon a LOOKUP query to cell values in another sheet.? I want to alter the formatting (i.e., text and/or cell background color), but not cell content.

    Is it possible to apply conditional formatting to a cell (or range) based upon a LOOKUP query to cell values in another sheet.?
    I want to alter the formatting (i.e., text and/or cell background color), but not the content, of the target cell(s).

    Hi Tom,
    Your LOOKUP formula will return a value that it finds in the "other" table. That value can be used in conditional highlighting rules. (Numbers 3 calls it conditional highlighting, not conditional formatting. Just to keep us awake, I guess, but it works the same).
    Please explain what you are trying to do.
    Regards,
    Ian.

  • Set cell background color conditionally?

    I want to set a cells' background colors conditionally, e.g., if the computer value is between 5 to 9, make the background red. Is there any way to do that?

    That is a good question. It would appear it does not work. A way around it is to put 1:00 (1 hour duration, not 1 o'clock) in a cell and a 1:30 in another then reference those cells as your two conditions.
    This is not the only place where the duration format is not fully implemented.

  • How to change a selected cell background color in JTable?

    Hi all,
    I am trying to change the background color of a selected cell by clicking on that particular cell. DefaultTableCellRenderer class provides setBackground(Color c) to change the background color of unselected cells. Is there a way to change a selected cell background color?
    Thank you,
    Arthur

    Write your own renderer (eg. extending DefaultTableRenderer) and put in getTableCellRendererComponent method something like this:
    if( isSelected && hasFocus )
        setBackground( Color.RED );
        setForeground( Color.GREEN );
    }

  • JTable cell background color

    Hi All,
    I want to change the background color of the same of the cells in jTabel. How can I do that.
    Like, I want to keep 3 cells in red color. Another 2 cells in in green color, And keep other cell background color to default.
    Also I want to change the background color of the cell, with different selection in other component(like jTree, jList).
    Thank you,
    Avin Patel

    The same cell renderer is used by all cells of the table. You can't just set the background color of a cell once. You have to reset it every time the cell renderer is called (depending on which row/column you are being asked to render). Here is an example:
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableCell extends JFrame
         JTable table;
         public TableCell()
              Object[][] data = { {"1", "A"}, {"2", "B"}, {"3", "C"}, {"4", "D"}  };
              String[] columnNames = {"Number","Letter"};
              DefaultTableModel model = new DefaultTableModel(data, columnNames);
              table = new JTable( model );
              //  Set default cell renderer
              TableCellRenderer renderer = new TestRenderer();
              table.setDefaultRenderer(Object.class, renderer);
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
         public static void main(String[] args)
              TableCell frame = new TableCell();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
         class TestRenderer extends DefaultTableCellRenderer
              public Component getTableCellRendererComponent(
                   JTable table,
                   Object value,
                   boolean isSelected,
                   boolean hasFocus,
                   int row,
                   int column)
                   super.getTableCellRendererComponent(table,
                   value, isSelected, hasFocus, row, column);
                   if (column == 0)
                        setHorizontalAlignment( LEFT );
                        setBackground( Color.blue );
                   else
                        setHorizontalAlignment( RIGHT );
                        setBackground( Color.green );
                   if (row == 1)
                        setBackground( Color.red );
                   return this;
    }

  • Is it possible to change cell Background color?

    I want to change table cell background color.
    Can anyone help me with code example?

    Hi,
    tanusree wrote:
    I want to change table cell background color.
    Can anyone help me with code example?You can find code example in the java tutorial.
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    exacting
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#renderer
    greetings
    Axel

  • Calendar Activity instance using calendar cell background color

    Hi ,
    We have a requirement to show activity instance belong to a certain provider in calendar using the calendar cell background color, instead of the color of activity. Is this possible? If so, how to implement it?
    I checked the calendar skin keys here:
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/skinningKeys/calendar.jspx
    but only find some keys related to activity like "af|calendar::month-time-activity", "af|calendar::all-day-activity" and "af|calendar::month-time-activity". These highlight the activity with color, but not the whole calendar cell.
    I saw there is a skin key called "af|calendar::month-grid-cell" which set the background color of the calendar cells for the month. This is similar to what I am looking for, but I would like the cell's background color for the cells of the activity instance only, not all the cells in the month.
    Any ideas?
    Thanks
    -Mina

    Hi Mina,
    There is a way to highlight cells corresponding to activity by using skinning, but you have to set the backgroud color property: af|calendar::month-time-activity{ background-color: Blue; }
    Georgiana :)

  • ADF calendar date cell  background color change

    Hi,
    I am new to jdeveloper / ADF.
    I coded per the below calender sample in my jdeveloper and it runs fine.
    http://www.oracle.com/technetwork/developer-tools/jdev/calendar-091799.html
    The current date cell shows in yellow color background. How/where can I change that color.
    Also the small calendar look up for the start/end date-time setting allows the user set the start/end time upto HH/MIN/seconds. How can I remove the seconds
    Thanks for all your help.

    You can create a new skin for your application and use the following selector which we deliver..
    .AFCalendarTodayBackground:alias
    background-color: blue;
    ALternatively, you can use the specific selector
    af|calendar af|calendar::day-of-week:today {
    background-color: blue;
    You can also see other ways of customizing your look and feel of the calendar component by referencing the hosted demo for skinning the calendar component.
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/skinningKeys/calendar.jspx

  • Table cell background  color in PDF

    I have a requirement to generate a PDF from a stoplight report.
    The stoplight report colors were implemented by setting the background color in table cells
    via css (background-color: red;). Its working in the browser but when I generate a pdf the cells show up with grey backgrounds. How can I generate a pdf with the correct colors?
    Thanks for your help.
    I'm using Apex 3.1 and pdf generation functionality that comes with Apex. I don't have BI Publisher.

    Hi David.
    At this time you don't get WYSIWYG reports in PDF.
    You're limited to the Column Colour settings you can specify in the Print Attributes of the report region but these would apply to all columns in the report and would not be dynamic.
    This may be something that is addressed in a future version of APEX.
    If anyone else knows different, feel free to chip in.
    Regards
    Simon

  • FORMS 6i and cells background color

    Hello,
    I ve got a tabular forms based on a table.
    Is it possible to change the background color of ONE or MORE cells ?
    Thanks.
    Romeo.

    I am with Mediware Information Systems and we have an opening for a Senior Oracle 6i DBA if you know of anyone who has 5 yrs. of Oracle 6i DBA experience. If so, they can send their resume to [email protected] with the subject line 06-029.
    Thanks!

  • JTable cell Background Color problem

    I overriden the table renderer and tried to chenge the color of only that row which has greater value in the third column. I coded the logic but it set the color of all the rows. The custom tablecellrendere code is as follows
          public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,boolean hasFocus, int row, int column)
                cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
                   if(vuti[0]==0)
                        //cell.setBackground(Color.pink);
                        vuti[0]=counter;
                   else
                        if (counter>vuti[0] && !isSelected)
                          vuti[0]=counter;
                          cell.setBackground(Color.lightGray);
                      else if(counter<vuti[0])
                        cell.setBackground(Color.white);
                return cell;
          }

    In the code that sets the background, you have a if - else (if - else if) structure. What's the default setting, when none of the 3 conditions are met?
    And learn to indent your code correctly so that code blocks are readily apparent.
    [http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html]
    db

  • Cell/Background color changes when copying to other Excel 2010 document

    When you copy and paste report cells (e.g. CO report outputted in Office integration, MS Excel) to a new Excel file, the background color changed dramatically (to bright red).
    SAP Theme:  SAP Signature Theme
    Excel 2010
    We tried paste option > match destination formatting but does not help.
    Anyone has similiar problems?  Appreciate any help.

    dear friend,
    you would do:
    1. search SAP Notes;
    2. check out the updates/patches for your MS Office;
    3. replicate it on another computer/another sap user (make sure it is a local issue)
    good luck!

  • Cell Background Color in Firefox

    I can't seem to get the background color for a cell to work
    in FireFox. It works okay in IE. But doesn't show up in FireFox.
    http://www.tusker.com/3tuskerTrips_KilimanjaroClimb_Routes_10.cfm
    Here's the page. The problem I'm having is with the bar of link
    towards the top of the page with the yellowish background. It's
    actually an image inside the cell and I'm trying to get the cell
    background to match the image color.

    Any help on this?

Maybe you are looking for

  • Final Cut 6 Video Formats

    Apple claims: "With native support for virtually any format", I was trying FCP6 in a friends office, I tryed many .mov and even .avi xvid compressed and seems to import fine, but the only format doestn work well is .vob files, they are imported the s

  • Basic Q, Routing all the audio tracks to a bus or aux channel strip ?

    I'm a little confused on this issue. I've been doing separate tracks for the sax solos and vocals using the best parts of several tracks with automation. I've been adding the same effect in each track separately and I know this is not good. I'd like

  • How to select the 5 most maximumst number and the 5 most minumumst number?

    Dear All, I draw a program. That is every loop the random number.vi create a number. I want to update the data in every loop to display the first 5 maximum number and the minumum. I don't know how to do it. Could you please give me some suggestions.

  • DNS load balancing for Enterprise serevrs

    Hi All In my test Lync 2010 Enterprise environments, recently i have implemented the DNS load balancing with webservices My environment is two lync 2010 ent servers , 1 SQL server, 1 Monitoring + Archive server (Same Box) The below steps was performe

  • ArrayOutOfBound exception thrown in JAI API

    Hi I am getting exception ArrayOutOfBound exception for one of my image sample that i tried. The code snippet is src is a BufferedImage. IndexColorModel icm = (IndexColorModel)src.getColorModel(); int numBands = 3; if(icm.hasAlpha()) numBands = 4; by