XML
  Home arrow XML arrow Page 4 - An Introduction to XUL Part 6
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
XML

An Introduction to XUL Part 6
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 9
    2005-06-27


    Table of Contents:
  • An Introduction to XUL Part 6
  • Stylesheet
  • Customization
  • Adding the Code to our XUL

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    An Introduction to XUL Part 6 - Adding the Code to our XUL
    ( Page 4 of 4 )

    Finally, open the XUL file created in the example from the last article.  Add this code to the top of the file, just below the XML declaration:

    <?xml-stylesheet href="chrome://openclose/skin/myskin.css"
    type="text/css"?>

    Once that is saved delete the chrome.rdf file from the Mozilla chrome directory and then launch Mozilla.  The XUL file is reference in the same was as before, and once open, you will see the changes laid out in the example stylesheet.  Adding alternative locale files to you applications is done in a similar way, using contents.rdf files to describe them and DTD instead of CSS Files. 

    If you’re creating multiple skins, it would be wise to package them up in JAR files yourself.  When doing this, the format that you use to register them in the installed-chrome.txt file changes.  You should store your own JAR archive in the Mozilla chrome folder along with the others and add the next line of code to the bottom of the file:

    skin,install,url,jar:resource:/chrome/yourjarname.jar!

    If you have a directory structure within the JAR file, the location of the stylesheet will need to come directly are the exclamation mark, so if there was  folder inside the JAR file called skin, then a folder inside that called metallic, which contained a stylesheet that gave interface elements a silver and grey colour scheme, the line of code would need to read:

    skin,install,url,jar:resource:/chrome/yourjarname.jar!/
      skin/metallic/

    The concepts in this article have related to defining element bindings using XBL and stylesheets, and changing the theme of your applications by using skins.  What I’ve shown you is just the beginning, there is far more than the scope of these articles can hope to include.

    XUL is an incredibly easy language to learn and is effective and powerful in what it can do.  I hope that this introduction to it will inspire you to learn more and to put this newfound knowledge into projects of your own to create new applications.



     
     
    >>> More XML Articles          >>> More By Dan Wellman
     

       

    XML ARTICLES

    - Flex Array Collection Sort and Filtering
    - The Flex Tree Control
    - Flex List Controls
    - Working with Flex and Datagrids
    - How to Set Up Podcasting and Vodcasting
    - Creating an RSS Reader Application
    - Building an RSS File
    - An Introduction to XUL Part 6
    - An Introduction to XUL Part 5
    - An Introduction to XUL Part 4
    - An Introduction to XUL Part 3
    - An Introduction to XUL Part 2
    - An Introduction to XUL Part 1
    - XML Matters: Practical XML Data Design and M...
    - Practical XML Data Design and Manipulation f...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek