XML
  Home arrow XML arrow Page 3 - 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 - Changing Textbox Attributes
    ( Page 3 of 6 )

    Note here that if you add a value attribute to the text box, this will display, but if a user clicks on it to add some text of their own, their text will be appended to the end of the string you set the value to rather than replacing it.  Without JavaScript to do something with the input it won’t do much anyway, but it’s worth bearing in mind for now.  Like HTML input boxes, XUL text boxes can also be one of several types of text boxes; password, autocomplete, or unusually, timed.  So adding the following code would add a text field that displayed stars when input was entered:

    <textbox id="pass" type="password"/>

    The syntax for the other types is very similar.

    Looking at your window, the various controls may seem a little random; we know what the controls are for because of the labels, but if the labels contained the values of the radio buttons for example, you would need some kind of heading or title to show the user what they were for.  Simple lines of text can be added to the window using either the <description value= ”yourtexthere”>, or the <caption label= ”yourtexthere”/> syntax.  The main difference between these is that captions are automatically indented slightly.  Additionally, you can specify a control label that is tied to the control using the id attribute of the control and the control attribute of the label:

    <label control="gender" value="Please select your gender"/>
      <radiogroup id="gender">
        <radio label="Male" selected="true"/>
        <radio label="Female"/>
    </radiogroup>

    Execute the file and see how it looks.



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