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  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
Moblin 
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? 
XML

An Introduction to XUL Part 6
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!

    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.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

       

    XML ARTICLES

    - 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...
    - SimpleXML
    - XForms Basics, Part 3
    - XForms Basics, Part 2
    - XForms Basics





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway