A Simple Example

For starters, review the LZX application in Listing 9.1. It uses a menubar, several menus, and a separator.

Listing 9.1. Using menus
<canvas>
    <menubar>
        <menu text="File" width="100">
            <menuitem text="New"/>
            <menuitem text="Open"/>
            <menuitem text="Save"/>
            <menuseparator/>
            <menuitem text="Exit"/>
        </menu>
        <menu text="Help" width="100">
            <menuitem text="About"/>
        </menu>
    </menubar>
</canvas>

You can compile and test the code in Listing 9.1 by directing your browser to this URL:

http://localhost:8080/lps-4.0.x/app09/menuTest1.lzx

Figure 9.2 shows the application.

Figure 9.2. An LZX application that uses menus


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset