XML
  Home arrow XML arrow Page 3 - An Introduction to XUL Part 2
Dev Shed Forums 
Administration  
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 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
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: 3 stars3 stars3 stars3 stars3 stars / 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:
      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

    TestComplete™ automates software testing for a fraction of what the big guys charge. Easy functional and load testing for all Windows, .NET, Java and Web apps. Download a free trial now.

    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


       · I was surprised and begin to work on it. When it came to button part, I have tried...
       · Hi,Sorry to hear you've had problems with this. I know that FireFox is...
       · Worked for me! Here's my code...
     

       

    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 4 hosted by Hostway