Mozilla Platform – UI Basics [Part 1]

My quest to build a basic desktop application using XUL continues. Last time I installed XULRunner and built a very simple, bare-bones test application. This time I want to add some of the things common to a desktop application UI:

  • Windows and Dialogs
  • Menus and Toolbars
  • OS Common Dialogs
  • Controls or Widgets

Windows
Each window or dialog should be created in it’s own XUL file. The XUL file may also contain other top-level declarations for CSS and DTD, which I will discuss in a moment. is the basic windowing element in XUL. It has attributes to set the title/caption as well as control width and height. Although I have not seen it mentioned yet, I am assuming that you can only have one element per XUL file. Here is an example: