Creating Web Pages

The New Form dialog in the JADE Painter provides the Web form style option, to enable you to define your Web pages.

As HTML does not allow for exact placement of controls nor the exact width and height, forms painted for the Internet are not "what you see is what you get" (WYSIWYG). Your HTML-generated page may therefore look different from your painted form. Experimentation and experience will enable you to design your forms to achieve the best results.

The paint event is not called when running a Web-enabled JADE application, as no JADE forms are created and displayed. Your Web page may look different from your painted form for the following reasons.

Ultimately, the layout of the Web page is determined by the Web browser. The same form can therefore look different in two different browsers. Even a Web-specific painter cannot always accurately generate HTML to reflect what has been painted. For this reason, keep your Web forms simple and always check the output against the Web browsers in which you expect your application to be used.

To reduce the amount of memory being used by Web sessions, JADE creates a physical window only for Ocx, OleControl, ActiveXControl, and MultiMedia controls and a form only if an Ocx, OleControl, ActiveXControl, or MultiMedia control is created. In most cases, the Window class hwnd method returns a null value unless a physical window or a form is created for an Ocx, OleControl, ActiveXControl, or MultiMedia control.

For report-type Web pages, the writeHTML method of the Frame class functions like the print method of the Printer class, except that HTML code is generated instead of output being directed to the printer or print preview when a Web session is active. If there is no active Web session, the behavior is that of the print method (that is, output is directed to the printer or print preview).

To create a Web page from the JADE Painter

  1. Select the New Form command from the File menu.

    Alternatively, click the New Form toolbar button.

    The New Form dialog is then displayed, to enable you to define your Web page.

  2. Specify a form name in the Form Name text box. You must specify a form name, which cannot be the name of another class in the current schema. The form name can be no longer than 29 characters. It can include numbers and underscore characters, but cannot include punctuation or spaces. The first letter of the name is converted to an uppercase character, if it is lowercase.

  3. If your form is a subform, perform one of the following actions.

    • Specify its superform in the Sub-Form of combo box.

    • Select its superform from the Sub-Form of combo box.

    • Select its superform from the Existing Forms list box.

  4. In the Form Style group box, select the Web option button. The JADE Painter switches to a mode that supports HTML-style windows. The grid is automatically set to support character mode painting (that is, snap-to-grid, with grid coordinates of 8 by 20 pixels for a 640 by 480 pixel display).

  5. Click the OK button. Alternatively, click the Cancel button to abandon your selections.