You are on page 1of 2

Content - Windows and scripts The declarations of the windows and the user interface elements contained within

them. These are stored in XUL files, which have a xul extension. A content package can have multiple XUL files, but the main window should have a filename that is the same as the package name. For example, the editor package will have a file within it called editor.xul. Scripts are placed in separate files alongside the XUL files. Skin - Style sheets, images and other theme specific files Style sheets describe details of the appearance of a window. They are stored separately from XUL files to facilitate modifying the skin (theme) of an application. Any images used are stored here also. Locale - Locale specific files All the text that is displayed within a window is stored separately. This way, a user can have a set for their own language.

The basic syntax of a chrome URL is as follows: chrome://<package name>/<part>/<file.xul>

BASIC ELEMENTS 1. <window> element: can have the ff attributes a. id= : this describes the name used to reference the window from other script files b. title= : the text that appears in the title bar of the window when it is displayed c. orient= : the arrangement of elements in the window. The default value is vertical d. xmlns: describes the namespace for xul .mozilla recognizes this url internally the correct way to open a window is to use a script Adding buttons to a window. Buttons have two main properties associated with them- a label and an image The most basic way to include text in a window is to use the label element. For longer text, you can place content inside opening and closing description tags. Unlike text specified with the label element and the value attribute, the child text will wrap onto multiple

lines if necessary.

The label element is intended for labels of controls, such as text fields. The description element is intended for other descriptive text such as informative text at the top of a dialog box. By convention, you should follow this guideline.

2. Text entry fields a. <textbox> element .. u can use the type= password to create a password field b. This element can be used to create a text area as well however set the <multiline> property to true 3. Check boxes and radio buttons The checkbox is used for options that can be enabled or disabled. Radio buttons can be used for a similar purpose when there are a set of them where only one can be selected at once. Use the ff elements : checkbox /radio

You might also like