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

Similar Messages

  • Right Way to change MBOs Connections

    Hellow Experts,
    I'm really enjoying the communication here, and I got a new one.
    Whats the right way of change MBOs Connections to SAP for instance?
    I tried 2 methods.
    Method One
    Title: Its just too much Work
    Proceeding:
    I start rebinding every MBO and  operatios to the new Connection.
    Drawback:
    If i have 1 MBO it may takes 30 seconds if they are 40 or 50 mbos it will take a lot of time.
    there are the output tables from bapis are recreated if dont they are deleted.
    so you have to reimplement all the operations one again. and it as the adicional
    problem that we all can miss something and do something wrong.
    Method Two
    Title: Simpler way
    Proceeding:
    change the connection profile itself at workspace from DEV->QA or QA->PRD
    Drawback:
    supposing that you want independence between the apps connections  like app1 is on DEV and ap 2 is on PRD.
    this will led to N connections per N applications.
    DEV: (Development)
    QA: (Quality)
    PRD: (Production)
    I would like to know if you guys have more approaches and what you think of this ones.
    Cheers,
    Laguerta

    Daniel Laguerta
    I will never follow method one as suggested by you.
    To add for the "Method 2", i will create a separate (new) workspace for different instance like DEV, QA, PROD.
    eg. Once DEV is done, i ll export the whole project, and import the same in a new workspace for QA.
         Create a new SUP QA and SAP connection profile
    Change connection profile to each mbo and its operations.
    And deploy to SUP QA Env
    Still it is time consuming.
    there is another method (should be preferable)
    Deploying mbo package from SCC instead of creating workspace and connection profiles.
    Deploying MBO from Sybase Control Center (SCC)
    Regards,
    JK

  • Custom Action to change selected column's Background color for a table in CEWP

    I have a OOTB CEWP. When I insert a table to this, I would like to see a context menu that would give me an option to change the selected cell's/row's/table's properties like cell padding/cell spacing/background color etc.
    How can this be achieved using SP2013 ribbon's custom actions. It would be great if we could add all these properties on a separate contextual tab when row/cell/table is selected.
    Rajasekar A.C

    Hi,
    If the table in Content Editor Web Part, we don’t need to use SharePoint Ribbon to achieve it.
    We can insert some input button and use jQuery to change the table tr/td background color.
    The code like this:
    <style type="text/css">
    .highlight {
    background-color: red;
    </style>
    <script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    $("#TableID tr").click(function () {
    $(this).toggleClass("highlight");
    </script>
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Dennis Guo
    TechNet Community Support

  • 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 );
    }

  • 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

  • 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;
    }

  • 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.
    >

  • 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.

  • 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 :)

  • 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.

  • Changing the text in each dataGrid row to a different color

    Okay I am going to try and be as clear as possible with this,
    so bare with me.
    What I am trying to do is make it so that when my
    arraycollection objects that I have retrieved from a web service
    are loaded in (by using the "dataProvider" attribute) my dataGrid
    that some sort of code will take place changing the color of each
    line of text (all the objects stored in the array collection are
    string types) and display each rows text in a different color.
    Now after looking into it, it seems the only way to alter the
    color of the text is to use some sort of style or format but it
    seems it only effects text in a "textArea, textField, textInput"
    etc... SOOO I figured why not create a itemRenderer that contains
    one of those and put it into the dataGrid... Which I did and still
    can't figure out a way to make it so you can dynamically alter the
    color based on a set of rbg values stored in a array the same size
    as the rowCount of the datagrid.
    so I am rather stumpped in what to do.. I DON'T want to
    change the background color of each row, so alternatingItemColor is
    out of the question, I just want the text displayed in each row to
    be a different color.... And I want all this color changing to
    happen either before the data is inputted into the dataGrid
    (manipulating the arraycollection some how..) or when its all
    already in there, it all needs to happen in code no user
    interaction.
    I was thinking perhaps maybe I could create a item Renderer
    object that contains the compenent (the textArea in it) and just
    make a array of item Renderer objects and pass those into the
    dataGrid, but I don't think that is possible.
    ANY IDEAS AT ALL!! On how to change the color of the text in
    each row of the datagrid to a different color would be a HUGE,
    HUGE!!! help. Or any info on how to setup a datagrid listener that
    listens for when a object (a row) from the arraycollection is added
    to the datagrid... Perhaps I could use that info some how to my
    advantage.
    email me, if you like I don't care I just need a answer to
    this its driving me crazy! I can change the background row color
    based on a array of rgb values but I can't change the color of the
    item in that row based on array of rgb values, ARG!
    [email protected]
    thanx in advanced.

    <mx:itemRenderer>
    <mx:Component>
    <mx:Label color = "red" />
    </mx:Component>
    </mx:itemRenderer>
    want to make it so I can change the color of the label on the
    dynamically by calling some sort of method I have created.. is that
    possible? if so coudl you please give a example, thanx!

  • What is the right way to change the active JInternalFrame for and MDI app?

    I am working on my own implementation of the window menu. The action that is triggered when a customer chooses a window to activate from the list in the menu is not behaving as I expected. The code I wrote (below) switches frames correctly but the caption bar never gets updated and if you restore a frame from an icon the frame is not correctly activated, there is even a restore button which if you push fixes things up and the frame then behaves normally     if (frameToActivate.isIcon ())  {
              //  Restore from icon
              desktopPane().getDesktopManager().deiconifyFrame (frameToActivate);
         desktopPane().getDesktopManager().activateFrame (frameToActivate);
         desktopPane().setSelectedFrame (frameToActivate);I did a search of the web and found a tip on JavaWorld (http://www.javaworld.com/javaworld/jw-05-2001/jw-0525-mdi.html) which led me to try doing this from a different angle - the JInternalFrame's point of view. This code works     try {
              if (frameToActivate.isIcon ())  {
                   //  Restore from icon
                   frameToActivate.setIcon (false);
              frameToActivate.moveToFront();
              frameToActivate.setSelected (true);
         } catch (PropertyVetoException error) {
              error.printStackTrace();
         }My question is why does the desktop based approach not work? If methods exist that appear to let you restore and switch between frames why are the ineffective? Am I missing something obvious that I should be doing?
    If using the JInternalFrame methods is the right way to go then I will It just seems like if the DesktopManager has methods that advertise that is supports managing the active frame then they should work. Before I ignore them I want to check with you to see if there is a right way to use them.
    Ian

    So, this is another batch of duke dollars I cannot assign - since I solved my own problem:-)
    I had an epiphany and tried setting break points to see what code was executed when you click on an inactive frame. From that I determined that DefaultDesktopManager.activateFrame, as implemented, does not activate the frame but acknowledges the activation of a frame and does a small amount of bookeeping work for the DesktopManager. So, the solution is the code I wrote to switch focus using the JInternalFrame's methods. Since I did not want to have to write those nine lines of code in the couple of places I want to programmatically switch the active frame I added a get/setActiveFrame method to my JDesktopPane derivative. In case others face this problem here is the code (warning I have not yet setup building the JavaDocs for this project so I cannot vouch for the validity of the JavaDoc, but the code does work):/**
    * Bring frameToActivate to the front (restoring from icon if neccessary) and make it the
    * selected frame.  This method does all the things required to switch the active frame for
    * an MDI application unlike: @link JDesktopPane.setSelectedFrame, which does not change the
    * focus; @link javax.swing.DefaultDesktopManager.activateFrame which does not correctly
    * handle iconified frames or switch the focus properly; and
    * @link javax.swing.JInternalFramesetSelected which also does not handle iconified frames.
    * @param frameToActivate the frame to bring to the front and become the active window
    * @throws IllegalArgumentException
    public void setActiveFrame (JInternalFrame frameToActivate) throws IllegalArgumentException  {
        if (frameToActivate == null)
            throw new IllegalArgumentException ("setActiveFrame a frame must be passed a non null valie.");
        try {
            if (frameToActivate.isIcon ())  {
                //  Restore from icon
                frameToActivate.setIcon (false);
            frameToActivate.moveToFront();
            frameToActivate.setSelected (true);
        } catch (PropertyVetoException error) {
    * This method returns the currently active frame.  This method returns the same frame
    * as <code>getSelectedFrame</code> and is provided for symetry for <code>setActiveFrame</code>. 
    * @return the currently active frame
    * @see LDesktopPane.setActiveFrame
    * @see javax.swing.JDesktopPane.getSelectedFrame
    public JInternalFrame getActiveFrame ()  {
        return getSelectedFrame ();
    }IL

  • Right way to change encoding settings

    Hi!
    When I encode footages I have to differet ways to change encoding settings - one is AME's settings panel. Second is Codec options. I'm confused - where must I change settings, must they be the same in both windows, or what's "primary" options window? Please, explain!

    Ok... But in that case, what settings are "primary", have a priority?  Those who are in codec options window or in regular AME settings window?

  • 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

  • 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!

Maybe you are looking for