Changing Button icon using CLAF Admin

Hi All ,
I have a requirement of changing the standard button icon to a client provided icon.
I am using CLAF Admin to create a custom look and feel for this purpose. In the custom LAF , I have changed the button icon in the "Customize Styles and Icons" page ( 2nd step of 3 step process ) .
I have followed the following steps :
1. Create a custom LAF "mylaf-desktop". Ckick Next. Select "button" in the component drop down
2. Select the "Icons" tab
3. Set the URI to "XX_BUTTON.gif", which transformed into ""cabo/images/mylaf-desktop/XX_BUTTON.gif" after saving.
4. Ported the custom icon into $OA_HTML/cabo/images/mylaf-desktop path.
After doing the above when I navigate to the preview page and give a random page URL , the buttons in the page are being displayed with the same old icon.
Any pointer or suggestion will be greatly helpful.
Thanks,
Srikanth

Hi Srikanth,
I've just posted a similar answer to you elsewhere but here it is again.
Buttons:
The button definition is probably the trickiest part of a CLAF as you can EITHER use dynamic Gifs (using icons) or define a HTML button in CSS.
1) If you want to you dynamic icons you need to create an icon for each part of the button (e.g. adding start, end, top and bottom icons) and reference the url to each in buttonStart, buttonEnd, buttonTopBackground, and buttonBottomBackground icon properties.
You can do this manually by extending your myclaf.xml file (OA_HTML/cabo/laf/myclaf.xml) with e.g:
<icon name="buttonStart">
<context-image uri="OA_HTML/cabo/images/myclaf-desktop/ButtonLeft.gif">
</context-image>
</icon>
...repeat for buttonEnd, buttonTopBackground, and buttonBottomBackground.
Once done, you will need to bounce your apache, clear all caches before changes will appear. Even after doing this, I have found button rendering to be a bit dodgy in some environments.
2) Instead of this technique I recommend simply adding the CSS button property to your xss file (OA_HTML/cabo/styles/myclaf.xss), e.g:
<style selector="button">
<property name="background-image">url(/OA_HTML/cabo/images/myclaf-desktop/buttongradient.gif)
</property>
<property name="background-color">#00CCCA
</property>
<property name="color">#ffffff
</property>
<property name="font-size">12px
</property>
<property name="font-weight">bold
</property>
<property name="border">solid #02A1A5 1px
</property>
<property name="white-space">nowrap
</property>
</style>
<style selector="button:hover">
<property name="background-image">url(/OA_HTML/cabo/images/myclaf-desktop/buttongradienthover.gif)
</property>
</style>
Browsers will pick this up and apply the changes to all buttons on claf pages.
The only problem with this is that you can only have 1 background image (e.g. see R12 swan buttons) and not a left, right, top, bottom image (see 11.5.10 buttons) - i.e. you can't have rounded corners.
Mike
Edited by: M West on 31-Mar-2009 05:53

Similar Messages

  • Change button icon at runtime

    hi
    we have applications developed using developer suite 10g.
    we have push buttons with icons and there is no problem at runtime as they are visible.
    Now we want to change the icon on the push button when mouse enters or mouse over it at runtime.
    Please give suggest in simple steps how to proceed.we are new to forms 10g.
    Thanks in advance

    These are the error messages appearing in java console.
    we are not able to trace it where the problem is.
    ERROR>WUC-19 [URLDownload.pullFile()] Unable to write to local file C:\PROGRA~1\Oracle\JINITI~1.22\bin\jacob.dll. Failed to download URL http://mbxserver/forms/webutil/jacob.dll
    ERROR>WUC-24 [URLDownload.pullFile()] Error reading URL http://mbxserver/forms/webutil/JNIsharedstubs.dll
    ERROR>WUC-24 [URLDownload.pullFile()] Error reading URL http://mbxserver/forms/webutil/d2kwut60.dll
    why jacob.dll is required in client pc.
    we had download webutil and jacob_18 from website.Chances are they may be corrupt.
    where can we get these files error free.
    Thanks

  • Change button icon in AS3

    I figured it would be simple to change an icon on the fly,
    like a label, using actionscript. But I'm not finding a way to do
    it. Suggestions.

    [Bindable]
    [Embed(source="assets/down.gif")]
    private var down:Class;
    [Bindable]
    [Embed(source="assets/up.gif")]
    private var up:Class;
    private function changeIcon():void {
    but.setStyle("icon", down);
    <mx:Button label="Test" id="but" icon="{up}"
    click="changeIcon()"/>

  • Want to change button background using UIManager for WindowsLookAndFeel

    Hi first i used ocean look and feel in my application. i used UIManager to change to color of the button. so all the buttons colors are change. fine
    But if i change the look and feel to windows look and feel it shows the windows look only. i sant to change the color to white. how?

    de to set the look and feel:
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");code to change button property
    UIManager.get("Panel.background");
    UIManager.put("Button.background", Color.WHITE);
    UIManager.put("Button.border", javax.swing.BorderFactory.createLineBorder(Color.black));
    UIManager.put("Button.opaque", true);change button properties are not affecting the jbutton. if i create.
    But if i remove the setLookAndFeel line properties are applying. why? remedy? is changing the ButtonUI is only option?

  • Possible to change folder icon using app.system()?  [PC/mac]

    I need help to verify if this works smoothly.
    ... If it is even possible...
    #target bridge;
    if ( BridgeTalk.appName == "bridge" ) {
         if ( Folder.fs == "Macintosh" ) {
              iconPath = new File("/someplace/MyIcon.icns");
              var myFolder = new Folder("/someplace");
              // select my folder and tell OSX to change the icon to MyIcon.icns
              app.system("mac command lines");
         } else if ( Folder.fs == "Windows" ) {
              iconPath = new File("/someplace/MyIcon.ico");
              myFolder = new Folder("/someplace");
              // select my folder and tell OSX to change the icon to MyIcon.ico
              app.system("command code"); // for windows7
         } else {
              alert ("Unsupported file system");

    var f=new File(app.document.presentationPath  + "/desktop.ini");
    f.open('w');
    f.encoding = "UTF8";
    f.writeln("[.ShellClassInfo]");
    // I have chosen one icon of windows7, but you can design and create your own icon, export it to .ico and add it here, for ex: f.writeln("IconResource=c:\\Users\\Public\\myIcons\\myicon.ico");
    f.writeln("IconResource=%windir%\\system32\\imageres.dll,101"); // if using dll of windows, a 2nd argument is needed to set the number of the icon (there are several possible dll libraries with hundreds of icons)
    f.writeln("[ViewState]");
    f.writeln("Mode=");
    f.writeln("Vid=");
    f.writeln("FolderType=Pictures");
    f.close();
    .hidden=true;
    var cmd = "attrib +s  \"" + decodeURI(app.document.presentationPath) + "\"";
    app.system(cmd);
    // go to the parent folder to refresh and come back again:
    var back = app.document.thumbnail.uri;
    app.document.thumbnail = app.document.thumbnail.parent;
    app.document.thumbnail.refresh();
    app.document.thumbnail = new Thumbnail(back);

  • Changing iPhone icons/9 page limit

    Hello, I was wondering if currently there was any way to change the icons used on the iPhone like you can in OSX. Also, I've hit an app barrier at 9 pages and cannot load in anymore. Is there anyway to expand beyond this limit? There are so many cool applications at the App Store! I hate to pick and choose. Thank you for your time.

    I appreciate your comments, and I suspect you are correct, Apple DID have reasons for leaving the icon limit at 9 pages. However, I disagree with your premise that those reasons are technical.
    I program embedded systems for a living, and believe me, there is no TECHNICAL reason for that limit. More likely, it was the expedient thing to do to get software out the door to meet a deadline, with the justification that "we can fix it later in an update."
    C'mon, how many bytes does an icon use? a few K or so? And how large are the apps those icons represent? Hundreds of k to many meg? It's not really about the number of icons that should be the limit, its how many MB of apps can you store, and that's not limited to "9 pages worth" according to the memory usage bar I see in iTunes.
    I've read several comments from people along the lines of "why would you ever need more than 144 apps?!" Apparently, these people have only 2 pair of pants (why would you ever need more than two, one to wear and one to wash?!?) one pen and or pencil, one television, etc.
    Let me ask you, how many songs do you have on your iPod? Pick any number, and according to that logic, I can certainly ask why in the world you would need to have that many!? I personally have almost filled my 80Gb iPod with music. Try and convince anyone that they only really need to have 50 songs, and if they want others, just "simply switch them out..." You may not remember the classic "why would anyone ever need more than 64k of ram?" argument that was made in the early 80's with some of the first "personal" computers(!)
    I think you get the idea.
    It's not about how many I USE, it's about how many I have with me when I'm traveling, and don't have access to my iTunes computer. It's about how many I get to choose from when I'm in the mood for a game. It's about not having to make a choice of which particular ones I think I'll want on a trip, it's having all of them available, with me, wherever I go. Isn't that kinda the point?
    The good thing is that I have no doubt in a future release, Apple will update their firmware to handle as many apps as you have memory for, and maybe even give us (now, hold your breath!) FOLDERS to organize this sea of icons! Wow, what a concept!
    - Kevin
    (p.s. don't even get me started on the lack of copy & paste!)

  • Change NativeWindow Icon

    Is it programmatically possible to change the icon of a window?  Specifically, a window created with HTMLLoader.createRootWindow.
    I know that I can change the Icon used for the entire application (NativeApplication.nativeApplication.icon)...  However, I would like to do it for a "child" HTML window.  Unfortunately, custom chrome is not an option because Transparency and the HTMLLoader don't play well together.
    Thanks in advance.

    You cannot do that -- sorry.

  • How can I change the icon for the bookmarks menu button

    Using linux, the default icon for the bookmarks menu button is quite ugly. Is there a way to change the icon for the button with some code in userChrome.css ?

    After several intents, I found a solution.
    This is my userChrome.css file:
    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
    toolbarbutton[class="toolbarbutton-1"]#bookmarks-menu-button image[class="toolbarbutton-icon"] {
    list-style-image: url("bookmark_gray.png") !important;
    -moz-image-region: rect(0px, 0px, 0px, 24px) !important;}
    Probably it's messy but works.

  • When I bootup the icon for Elements shows up in orange.  It changes to green only when I've gone to Finder and clicked on Elelments under the Devices list.  This is a recent development.  The icon used to be green upon bootup.  Does anyone know why ?

    When I bootup the icon for Elements shows up in orange.  It changes to green only when I've gone to Finder and clicked on Elelments under the Devices list.  This is a recent development.  The icon used to be green upon bootup.  Does anyone know why ?

    I'm sorry to hear that.
    I'm not affiliated w/ the developer, just a happy user that gave up fighting the apple podcast app a while ago.  I used to have a bunch of smart playlists in itunes for my podcasts, and come home every day and pathologically synced my phone as soon as I walked in the door, and again before I walked out the door in the morning.
    Since my wife was doing this too, we were fighting over who's turn it was to sync their phone.
    Since I've switched to Downcast, I no longer worry about syncing my phone to itunes at all.  I can go weeks between syncs.
    Setup a "playlist" in downcast (ex., "Commute") and add podcasts to that playlist.  Add another playlist ("walk" or "workout") and add different podcasts to that one. 
    Set podcast priorities on a per-feed basis (ex., high priority for some daily news feeds, medium priority for some favorite podcasts, lower priority for other stuff).  Downcast will play the things in the priority you specify, and within that priority, it will play in date order (oldest to newest).
    Allegedly, it will also sync your play status to other devices, although that is not a feature I currently use and can't vouch for.  It uses apple's iCloud APIs, so to some extent may be limited by what Apple's APIs can do.

  • When I click on a link in an RSS feed it used to indicate that I'd viewed that particular link by changing the icon to the left of the link. It doesn't do that anymore. [SOLVED]

    When I click on a link in an RSS feed it used to indicate that I'd viewed that particular link by changing the icon to the left of the link. It doesn't do that anymore. This started happening right around the time I updated to Firefox 4, but may have been a little before that too. For some things, like news and web comics it's just a little annoying. For important things like looking for new journal articles for my job, it literally makes my job more difficult. So fixing this would make my day.

    I seem to have solved my own problem. When I disabled the add-on "Tab Renamizer" everything started working fine.

  • How to change an icon of a button

    hi guys,
    i want to change the icon of a button when it is click
    how can i do it?
    thanks

    You register a listener for that button, e.g.:
    button.addActionListener(new...)
    Then add code to the listener class:
    button.setIcon(new...)
    If you've not come across listeners yet though, you'll need to explore these a bit first.
    Andy.

  • Multiple flash files change when a button click using javascript function

    hi.. am new in flsh...
    i want to multiple flash files change when a button click using a javascript

    <script>
    var count=0;
    function mafunct(newSrc){
        alert("hi");
    var path="a"+count+".swf"; 
    flash+='<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" WIDTH="100%" HEIGHT="100%">';         
        flash+='<PARAM NAME=movie VALUE="'+path+'">';         
        flash+='<PARAM NAME="PLAY" VALUE="false">'; 
        flash+='<PARAM NAME="LOOP" VALUE="false">';
        flash+='<PARAM NAME="QUALITY" VALUE="high">';
        flash+='<PARAM NAME="SCALE" VALUE="SHOWALL">';
        flash+='<EMBED NAME="testmovie" SRC="Menu.swf" WIDTH="100%" HEIGHT="100%"PLAY="false" LOOP="false" QUALITY="high" SCALE="SHOWALL"swLiveConnect="true"PLUGINSPAGE="http://www.macromedia.com/go/flashplayer/">';
        flash+='</EMBED>';
        flash+='</OBJECT>';    
    count++;
    alert(path+"aa");
    </script>
    <button onclick="mafunct()">next</button>

  • How do I change the image used on an movie project icon? iMovie seems to select an image at random from the images I imported.

    How do I change the image used on an movie project icon?
    iMovie seems to select an image at random from the images I imported.

    Not sure I understand how to use what you have posted. Here's what my init() looks like:
    public void init()
    setLayout(new BorderLayout());
    p=new Panel();
    p.setLayout(new GridLayout(1,1));
    callnowButtonURL = getURL(callnowButtonFilename);
    if (callnowButtonURL != null)
    callIcon = new ImageIcon(callnowButtonURL,"call");
    endcallButtonURL = getURL(endcallButtonFilename);
    if (endcallButtonURL != null)
    endIcon = new ImageIcon(endcallButtonURL);
    b=new JButton(callIcon);
    b.setBorder(new EmptyBorder(0,0,0,0));
    b.setBorderPainted(false);
    b.addActionListener(this);
    p.add(b);
    add(p,"Center");
    Now the ActionListener is basically:
    public void actionPerformed(ActionEvent e)
    if (mybool == false)
    <Perform actions here set mybool to true>
    Change JButton b to use EndIcon
    else
    <Perform actions here set mybool to false>
    Change JButton b to use CallIcon
    Can you clarify how to perform the action I require? You can have a couple of Dukes if you can help me sort this out.

  • What Adobe Product From CS5 is Used For Creating Buttons/Icons For WebPages?

    Hi I have CS5 Adobe Creative Suite and I want to create some graphic "Buttons" to use for my web pages.  What product in the Creative Suite is best suited for doing this?
    Thanks In Advance!

    Copy & paste the following code into a new, blank HTML document.  For expediency, I embedded CSS code here.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>CSS Menu Test</title>
    <style type="text/css">
    /* BEGIN HORIZONTAL DROP-MENU */
    #navbar{
    position:relative;
    width: 100%;
    margin: 0 0 0 45px; /**adjust as needed**/
    padding:0;
    text-align:center;
    #navbar li {
    list-style: none;
    font-size: 12px;
    float: left;
    text-align:center;
    /**top level menu**/
    #navbar li a {
    display: block;
    text-decoration: none;
    margin-right: 12px; /* space between links */
    color: #FFF;
    width: 9em; /* adjust as needed or use auto */
    padding: 8px;
    font-weight:bold;
    line-height: 1.50em;
    background: #C33;
    background: -moz-linear-gradient(#C33, #111);
    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #111),color-stop(1, #C33));   
    background: -webkit-linear-gradient(#C33, #111);   
    background: -o-linear-gradient(#C33, #111);
    background: -ms-linear-gradient(#C33, #111);
    background: linear-gradient(#C33, #111);
    /* gradient filters for IE6-9 */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C33333', endColorstr='#111111',GradientType=0 );
    /**rounded borders**/
    -moz-border-radius: 25px;
    -webkit-border-radius:25px;
    border-radius: 25px;
    /**top menu style on mouse over - in good browsers**/
    #navbar li:hover > a {
    color: #FFF;
    background: #333;
    background: -moz-linear-gradient(#333, #EAEAEA);
    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #EAEAEA),color-stop(1, #333));   
    background: -webkit-linear-gradient(#333, #EAEAEA);   
    background: -o-linear-gradient(#333, #EAEAEA);
    background: -ms-linear-gradient(#333, #EAEAEA);
    background: linear-gradient(#333, #EAEAEA);
    /* gradient filters for IE6-9 */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#333333', endColorstr='#EAEAEA',GradientType=0 )
    /**sub-menu**/
    #navbar li ul {
    display: none;
    text-align:center;
    margin:0;
    padding:0 1em;
    background:none;
    /**sub-menu, help for IE6**/
    #navbar li:hover ul,
    #navbar li.hover ul {
    display: block;
    position: absolute;
    padding: 0;
    #navbar li:hover li,
    #navbar li.hover li {
    float: left;}
    /**drop-menu style**/
    #navbar li:hover li a,
    #navbar li.hover li a {
    color: #0D207D;
    width: auto; /* adjust width as needed or use auto */
    background: none;
    filter:none;
    /**drop-menu style on mouse over**/
    #navbar li li a:hover {
    color: #990000;
    text-decoration:underline;
    /* Clear floated elements at the end*/
    #navbar:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
    /**end Horizontal drop-menus**/
    </style>
    </head>
    <body>
    <ul id="navbar">
    <li><a class="first" href="#">ABOUT US &#9660;</a>
    <ul>
    <li><a href="#">Videos</a></li>
    <li><a href="#">Newsletter</a></li></ul>
    </li>
    <li><a href="#">PRODUCTS &#9660;</a>
    <ul>
    <li><a href="#">Broken Glass</a></li>
    <li><a href="#">Mosaic Tiles</a></li>
    <li><a href="#">Adhesives</a></li>
    <li><a href="#">Grout</a></li></ul>
    </li>
    <li><a href="#">ACCESSORIES &#9660;</a><ul>
    <li><a href="#">Gloves</a></li>
    <li><a href="#">Rubber Mallets</a></li>
    <li><a href="#">Sponges</a></li>
    <li><a href="#">Safety Glasses</a></li></ul>
    </li>
    <li><a href="#">CONTACT</a></li>
    </ul>
    </body>
    </html>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • If your Send / button icons are missing in new messages in Mail, do this

    I was mystified as to why the button icons (for Send, Attach, etc) were suddenly missing from my "new message" email windows. The text descriptions were still there, so i could use the functions, but they were in tiny text, more difficult to click on. Trying to drag the icons back on from the view/customize toolbar menus (as was suggested in prior discussions i found here here) did not work.
    Then i noticed a drop-down menu called "Show" in the bottom left of the View> Customize Toolbar window (opened directly from a New Message window). It toggles whether you see Text Only, Icons and Text, or Icons Only. Mine was somehow set to Text Only. Just toggling it to Text and Icons brought my buttons back.
    I don't know how that preference got changed- i didn't do it, and no one else has access to my Mac- and it looks from Discussions like this has happened to others, and only while in New Message (a glitch?).
    This is the simple but not immediately apparent fix.

    Thanks Bernd:  I am using Adobe Acrobat 10 Pro.  I did get a response from Dave Marchant which directed me how to find the layers icon and I found the options icon as suggested in Adobe Help.  However, the options do not allow me to choose an option of either merging layers or flattening layers.  I am a novice at this and am trying to get this 1-page pdf graphic to convert to a Word document.  Is it possible that I already have a single layer pdf and that Word is doing something weird during the conversion?  I tried to convert the document yesterday and I ended up with two pages in Word.  One page had the text boxes and one had the river channels on which the text boxes had been inserted.  This is not a document I created.  We have been struggling for 5 years at various times to get this one page document into Word so that it can be used in multiple reports.  Even the graphics departments at a couple of companies have not been able to get this document resized from the original 11 x 17 format into 8.5 x 11.  I managed to get that done yesterday.  But now can't get a useable version into Word.  Suggestions?

Maybe you are looking for

  • Deltas are not mooving to Next ODS

    Hi,The process chain tirggered job is not updating deltas from one ODS to next ODS. Please help me to understand this. Thanks, Vasu

  • How to delete adress bar history on iphone

    hi this is angela i try to deleate my adress bar history on my iphone /ipad,but it still showes some urls and all history is cear but i have a issue there is only 3 adresss in a adress bar that still in there how should i clear thoses

  • Exporting JPEGs out of Lightroom3 to be projected on a screen

    I export JPEG files via a Lightroom 3 preset to an email attachment and then to be projected on a screen.  The color space setting I use is sRBG.  Is this setting the same as sRBGIEC61966-2.1 used in CS5?  When projected, my images are soft while  th

  • Where do you assign the Applicant Acknowledgement letter in E-Recruiting?

    Hi All, Where do you go to assign the applicant acknowledgement email correspondent letter in E-Recruiting?  I want to be able to choose which applicant acknowledgment letter I wish to send to an applicant when they apply to a job. Additionally, what

  • Problem of Flex Date.toUTCString();

    I used the date.toUTCString function but the returned result is always one month later than the time I need. For examle, I used " var date:Date=new Date();                               var date.setUTCMonth(7);                                var str: