XML
  Home arrow XML arrow Page 6 - An Introduction to XUL Part 2
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? 
XML

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


    Table of Contents:
  • An Introduction to XUL Part 2
  • Organizing Buttons
  • Changing Textbox Attributes
  • Menu Bar and Interface
  • Cleaning Up and Adding a Status Bar
  • Using ToolTips and Progress Bars

  • 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 2 - Using ToolTips and Progress Bars
    ( Page 6 of 6 )

    One feature that I haven’t mentioned yet is the tool tip feature; tooltips are the ‘helpful’ popups that give you additional information when you hover the mouse pointer over an element on the screen.  For text-only tooltips, you can just add a tooltiptext=" texthere" attribute to almost any element.  For tooltips containing other types of content, you have to use the tooltip element and associate it with the relevant element in the much the same way that labels are associated with controls.  In your working file, add the tooltip element set to one of the buttons and make sure you add the tooltip attribute to the button element that the tooltip is to be associated with:

    <button label="I am a button!" tooltip="tooltip1"/>
      <popupset>
        <tooltip id="tooltip1">
          <description value="A tooltip!"/>
        </tooltip>
      </popupset>

    Another cool interface element you can create easily is the progress bar; with just a few lines of code, you can have a window that pops up displaying a visual indication of how long a task has left to complete, or evidence that there is activity going on within the application.  The following code will display a window with a progress meter in it:

    <?xml version="1.0"?>
    <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    <window id="progress" title="Progress Meter" width="150" height="150" screenX="50" screenY="100" xmlns="http://
    www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
      <label value="Loading…" />
      <progressmeter mode="undetermined" />
    </window>

    The mode attribute of the progress meter can be either undetermined, as above, or determined.  With a determined mode, you also need to specify a value in percent of what percentage of the bar is filled.  If you change the above code to read:

    <progressmeter mode="determined" value="50%" />

    then executed the file, you would see that the progress bar is half filled.  In fact, the value of mode can be anything other than "undetermined" to get this effect.  The next article in this series looks at how to specify the position of elements in a little more detail.



     
     
    >>> 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 2 Hosted by Hostway
    Stay green...Green IT